diff options
author | Ken Sharp <ken.sharp@artifex.com> | 2023-05-01 14:28:01 +0100 |
---|---|---|
committer | Ken Sharp <ken.sharp@artifex.com> | 2023-05-01 14:28:01 +0100 |
commit | ce43049e4d96507d130fb24fe0c6428e4adeb627 (patch) | |
tree | 29acceb2aa3b8b97f213c757b9406ab0f16f9071 | |
parent | 38e5e7a1f535c85f0c0c699214aca533ba552a79 (diff) | |
download | ghostpdl-ce43049e4d96507d130fb24fe0c6428e4adeb627.tar.gz |
PDF interpreter - clean up after Potfolio/Collection files
Noticed while working on a different issue; we were not cleaning up the
dictionary, nor restoring back the PostScript state, after running a
Portfolio (PDF Collection) file.
Fixed by calling runpdfend after running all of the embedded PDF files.
-rw-r--r-- | Resource/Init/pdf_main.ps | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Resource/Init/pdf_main.ps b/Resource/Init/pdf_main.ps index 4c8ecfbbd..90fbaf83a 100644 --- a/Resource/Init/pdf_main.ps +++ b/Resource/Init/pdf_main.ps @@ -966,6 +966,11 @@ currentdict /PDFSwitches undef 1 index exch get (r) file runpdf_collection_entry } for pop + % We need to do this, even though we called pdfclose above, in order to clean + % up our dictionary and restore the state. We can't use runpdfend above because + % if we do then we will delete all the temporary files containing the embedded + % PDF files. + runpdfend } { process_trailer_attrs % - process_trailer_attrs - |