Created attachment 1612225 [details] Input pdf (outputted from pdftopdf filter) Hi, I was debugging https://bugzilla.redhat.com/show_bug.cgi?id=1716582 and I found out user's pdf file got bad after running through gs. When you open it in 'gs' - you can see that error sometimes, but if you open it in text editor, you can see the error clearly: (ERROR: )//prnt exec errorname//prnt exec (OFFENDING COMMAND: )//prnt exec /command load//prnt exec $error/ostack known{ (%%[STACK:)= (STACK:)//prnt exec I got the input pdf by running pdftopdf filter by hand, I'll attach it to ticket. I'm not sure how would be output on user's printer, but when I printed out the output on canon imagerunner (with canon-imagerunner_C5185i postscript ppd), the headline got garbled. Version-Release number of selected component (if applicable): ghostscript-9.26-5fc29 Steps to Reproduce: gs -q -dNOPAUSE -dBATCH -dSAFER -dNOMEDIAATTRS -sDEVICE=ps2write -dShowAcroForm -sOUTPUTFILE=out2.ps -dLanguageLevel=3 -r600 -dCompressFonts=false -dNoT3CCITT -dNOINTERPOLATE -c 'save pop' -f out1.pdf Actual results: Error in postscript file, resulting in garbled document Expected results: No error, good printout document
Created attachment 1612226 [details] Output of gs - with error in it
It would be good to get the exact error the mentioned ps code prints to stdout because the generated code looks correct. I just compared the produced code on our 9.26-5 and it is exactly the same as for the current upstream master/b5e5ed8620f348e0fa619171d6f05a966a4bcf83. ~~~ $ diff -y --suppress-common-lines master-b5e5ed8620f348e0fa619171d6f05a966a4bcf83-out2.ps out2-error-from-BZ.ps %%Invocation: gs -q -dNOPAUSE -dBATCH -dSAFER -dNOMEDIAATTRS < %%Creator: GPL Ghostscript GIT PRERELEASE 929 (ps2write) | %%Creator: GPL Ghostscript 926 (ps2write) %%CreationDate: D:20190906044406-04'00' | %%CreationDate: D:20190906083545+02'00' pagesave restore < /pagesave save def < > /pagesave save def > pagesave restore > %%PageTrailer $ ~~~ and when displaying both of them through gs they show all the elements correctly/the same like it is with the input pdf file. It looks as if the problem with mangled page arose somewhere else during the process of printing.
I'm sorry the garbled pdf was actually caused by sending a file which was preprocessed with other driver than driver which was used for printing. Meaning: I ran filters which created pdf file for one ppd, but then I printed result with other ppd.