Bug 701988

Summary: Ghostscript command throwing error
Product: Ghostscript Reporter: Manikanta Cheruku <manik.cr24>
Component: GeneralAssignee: Default assignee <ghostpdl-bugs>
Status: RESOLVED DUPLICATE    
Severity: blocker CC: chris.liddell
Priority: P4    
Version: 9.50   
Hardware: PC   
OS: Windows 10   
Customer: Word Size: ---

Description Manikanta Cheruku 2019-12-13 06:45:13 UTC
Hello team,

Use case : pdf to tiff, pdf to pdfx, pdf to pdf.


Till now we are using gs9.27 which worked fine, but when we upgrade to gs9.50 we are getting an error with the same command 

"Error: /undefinedfilename in (C:\\Test\\input.pdf)
Operand stack:"


gs9.50 command used :

"C:\Program Files\gs\gs9.50\bin\gswin64c.exe" -dSAFER -dBATCH -dNOPAUSE -dNOPROMPT -dNOOUTERSAVE -sDEVICE=tiffg4 -r300 -sOutputFile=C:\test\out.tiff -- C:\Test\input.pdf


This is failing for any pdf input. 

Kindly suggest, if any changes needed in command line.


Thank you,
Manik Cheruku.
Comment 1 Chris Liddell (chrisl) 2019-12-13 08:13:37 UTC
Don't use the "--" before the input file. Why are you using "--" anyway??
Comment 2 Manikanta Cheruku 2019-12-13 10:44:58 UTC
(In reply to Chris Liddell (chrisl) from comment #1)
> Don't use the "--" before the input file. Why are you using "--" anyway??


Hi Chris,

Thank you so much for quick reply. I was under impression that "--" should be before the input file. And also it worked so far, till gs9.27.

Thank you for the suggestion. It worked.



-Manik Cheruku.
Comment 3 Chris Liddell (chrisl) 2019-12-13 11:23:52 UTC
(In reply to Manikanta Cheruku from comment #2)
> (In reply to Chris Liddell (chrisl) from comment #1)
> > Don't use the "--" before the input file. Why are you using "--" anyway??
> 
> 
> Hi Chris,
> 
> Thank you so much for quick reply. I was under impression that "--" should
> be before the input file. And also it worked so far, till gs9.27.

Yes, -- should go before the input file, but it has a specific purpose that does appear to apply in your usage:
https://www.ghostscript.com/doc/Use.htm#General_switches

There was a bug associated with "--" and interaction with the revised security measures introduced in 9.50:
https://bugs.ghostscript.com/show_bug.cgi?id=701894

which was fixed early in November. But based on the information you've supplied, there's no reason for you to use "--" and so no reason for you to encounter the problem.

*** This bug has been marked as a duplicate of bug 701894 ***