Blob
- Date:
- Message:
- page: fix pdf prolog for ghostscript >= 9.27 (#296) Ghostscript 9.27 removed GS_PDF_ProcSet and pdfdict due to a security issue (see https://security-tracker.debian.org/tracker/CVE-2019-3839). This fix was contributed by @onyxperidot (see #279). Fixes #279
- Actions:
- History | Blame | Raw File
1 /Page null def2 /Page# 0 def3 /PDFSave null def4 /DSCPageCount 0 def5 /DoPDFPage {dup /Page# exch store pdfgetpage pdfshowpage } def7 /pdfshowpage_mysetpage { % <pagedict> pdfshowpage_mysetpage <pagedict>8 dup /CropBox pget {9 boxrect10 2 array astore /PageSize exch 4 2 roll11 4 index /Rotate pget {12 dup 0 lt {360 add} if 90 idiv {exch neg} repeat13 } if14 exch neg exch 2 array astore /PageOffset exch15 << 5 1 roll >> setpagedevice16 } if17 } bind def19 runpdfbegin