Bug 1749661 - Error OFFENDING command STACK: in outputted postscript file
Summary: Error OFFENDING command STACK: in outputted postscript file
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: ghostscript
Version: 29
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Martin Osvald 🛹
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-09-06 07:37 UTC by Zdenek Dohnal
Modified: 2019-09-06 10:21 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-09-06 10:21:14 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
Input pdf (outputted from pdftopdf filter) (51.26 KB, application/pdf)
2019-09-06 07:37 UTC, Zdenek Dohnal
no flags Details
Output of gs - with error in it (340.57 KB, application/postscript)
2019-09-06 07:38 UTC, Zdenek Dohnal
no flags Details

Description Zdenek Dohnal 2019-09-06 07:37:23 UTC
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

Comment 1 Zdenek Dohnal 2019-09-06 07:38:58 UTC
Created attachment 1612226 [details]
Output of gs - with error in it

Comment 2 Martin Osvald 🛹 2019-09-06 09:26:53 UTC
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.

Comment 3 Zdenek Dohnal 2019-09-06 10:21:14 UTC
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.


Note You need to log in before you can comment on or make changes to this bug.