diff options
author | rsc <devnull@localhost> | 2005-01-04 22:31:35 +0000 |
---|---|---|
committer | rsc <devnull@localhost> | 2005-01-04 22:31:35 +0000 |
commit | 9e6fcbd790d26b54b2ea054e651020645a42db1a (patch) | |
tree | 94a1eec435c11dff4fad1ddb665d981b43ae0bc2 /src/cmd/page | |
parent | b2ad2ef1387571c7b917a7fd63e8670582ae8b7f (diff) | |
download | plan9port-9e6fcbd790d26b54b2ea054e651020645a42db1a.tar.gz plan9port-9e6fcbd790d26b54b2ea054e651020645a42db1a.tar.bz2 plan9port-9e6fcbd790d26b54b2ea054e651020645a42db1a.zip |
forgot this
Diffstat (limited to 'src/cmd/page')
-rw-r--r-- | src/cmd/page/pdfprolog.ps | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/src/cmd/page/pdfprolog.ps b/src/cmd/page/pdfprolog.ps new file mode 100644 index 00000000..c4c31c92 --- /dev/null +++ b/src/cmd/page/pdfprolog.ps @@ -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 |