diff options
author | Ken Sharp <ken.sharp@artifex.com> | 2021-09-13 18:10:50 +0100 |
---|---|---|
committer | Chris Liddell <chris.liddell@artifex.com> | 2021-09-15 08:55:09 +0100 |
commit | 708b5de69bec3602ab55b3cfd05b6e6966351a98 (patch) | |
tree | d83229b7a2ccc8f8cc598140c5f9a6845ef02215 /Resource | |
parent | 07776704f7d1522fd3143f9e395a836d7da6e0f2 (diff) | |
download | ghostpdl-708b5de69bec3602ab55b3cfd05b6e6966351a98.tar.gz |
GhostPDF - Add page level gsave/grestore
For the PostScript integration, do a gsave/gestore pair around each
page. It should not be possible for the PDF interpreter to violate
this, but let's make sure.
Diffstat (limited to 'Resource')
-rw-r--r-- | Resource/Init/pdf_main.ps | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/Resource/Init/pdf_main.ps b/Resource/Init/pdf_main.ps index 877b0e1f5..038c19d1d 100644 --- a/Resource/Init/pdf_main.ps +++ b/Resource/Init/pdf_main.ps @@ -969,6 +969,7 @@ systemdict /NEWPDF known not {/NEWPDF //false def} if /newpdf_pdfshowpage_init { + gsave } bind def /newpdf_pdfshowpage_setpage @@ -986,6 +987,7 @@ systemdict /NEWPDF known not {/NEWPDF //false def} if ( Output may be incorrect.\n) newpdf_pdfformaterror } if showpage + grestore } bind def /newpdf_pdfshowpage @@ -3947,9 +3949,9 @@ currentdict /PDF2PS_matrix_key undef not and //systemdict /PreserveAnnots .knownget not {//true} if and { - mark exch {preserveannot} PDFSTOPONERROR {exec}{stopped {(Error: Ignoring invalid annotation, output may be incorrect.\n) pdfformaterror} if} ifelse cleartomark + mark exch {preserveannot} PDFSTOPONERROR {exec}{stopped {(Error: Ignoring invalid annotation, output may be incorrect.\n) pdfformaterror} if} ifelse {cleartomark} stopped pop }{ - mark exch {drawannot} PDFSTOPONERROR {exec}{stopped {(Error: Ignoring invalid annotation, output may be incorrect.\n) pdfformaterror} if} ifelse cleartomark + mark exch {drawannot} PDFSTOPONERROR {exec}{stopped {(Error: Ignoring invalid annotation, output may be incorrect.\n) pdfformaterror} if} ifelse {cleartomark} stopped pop } ifelse } { pop |