mirror of
https://github.com/9fans/plan9port.git
synced 2025-01-24 11:41:58 +00:00
forgot this
This commit is contained in:
parent
b2ad2ef138
commit
9e6fcbd790
1 changed files with 29 additions and 0 deletions
29
src/cmd/page/pdfprolog.ps
Normal file
29
src/cmd/page/pdfprolog.ps
Normal file
|
@ -0,0 +1,29 @@
|
|||
/Page null def
|
||||
/Page# 0 def
|
||||
/PDFSave null def
|
||||
/DSCPageCount 0 def
|
||||
/DoPDFPage {dup /Page# exch store pdfgetpage mypdfshowpage } def
|
||||
|
||||
/pdfshowpage_mysetpage { % <pagedict> pdfshowpage_mysetpage <pagedict>
|
||||
dup /CropBox pget {
|
||||
boxrect
|
||||
2 array astore /PageSize exch 4 2 roll
|
||||
neg exch neg exch 2 array astore /PageOffset exch
|
||||
<< 5 1 roll >> setpagedevice
|
||||
} if
|
||||
} bind def
|
||||
|
||||
/mypdfshowpage % <pagedict> pdfshowpage -
|
||||
{ dup /Page exch store
|
||||
pdfshowpage_init
|
||||
pdfshowpage_setpage
|
||||
pdfshowpage_mysetpage
|
||||
save /PDFSave exch store
|
||||
(before exec) VMDEBUG
|
||||
pdfshowpage_finish
|
||||
(after exec) VMDEBUG
|
||||
PDFSave restore
|
||||
} bind def
|
||||
|
||||
GS_PDF_ProcSet begin
|
||||
pdfdict begin
|
Loading…
Reference in a new issue