Bug 697245

Summary: Generated postscript by ps2write causes limitcheck for save error
Product: Ghostscript Reporter: Doug Moore <dmoore>
Component: PS WriterAssignee: Ken Sharp <ken.sharp>
Status: RESOLVED FIXED    
Severity: normal CC: chris.liddell, dmoore, reiner.saalfrank
Priority: P4    
Version: 9.19   
Hardware: PC   
OS: Linux   
Customer: Word Size: ---
Attachments: Source PDF
output postscript file

Description Doug Moore 2016-10-26 14:56:43 UTC
Created attachment 13051 [details]
Source PDF

PDF files that have more then 15 pages that are a different size then the rest of the PDF pages causes Printers and Adobe Pro to have a limitcheck error for size. For example, a PDF with mostly pages being USLetter size but have 17 pages in the document that are 9x11 page size. The postscript generated with this command line:

gs -dNOPAUSE -dBATCH -r600 -sDEVICE=ps2write -dSAFER -q -sOutputFile=test.ps -c save pop -f Binder5.pdf

Cause this error when distilled with Adobe pro:

%%[ Error: limitcheck; OffendingCommand: save ]%%

Stack:
/pagesave
false
792
648
0
0
792
648
-dict-
7186


%%[ Flushing: rest of job (to end-of-file) will be ignored ]%%
%%[ Warning: PostScript error. No PDF file produced. ] %%

Printers tested give the same error.

Attached is an example PDF and postscript file.
Comment 1 Doug Moore 2016-10-26 14:57:31 UTC
Created attachment 13052 [details]
output postscript file
Comment 2 Ken Sharp 2016-11-14 07:08:38 UTC
This is caused by limitations in the architecture of Adobe PostScript interpreters.

Commit 0f6067d2531298060392d0e25fa759d320e03021 works around the problem.

NB it would really help to submit specimen files with less content and fewer pages.
Comment 3 Ken Sharp 2016-11-25 05:06:05 UTC
*** Bug 697376 has been marked as a duplicate of this bug. ***