Ps2pdf Error /undefinedfilename In True
managed to help me out. Here's the story for posterity's sake.I'm currently working on a LaTeX document with some photos error /undefined in ps2pdf in it. As I'm using the PowerDot class, which is incompatible ps2pdf windows with pdflatex, I need to convert all my images to EPS and use ps2pdf to get my ghostscript windows final PDF document. On the first attempt, I used the commandps2pdf file.ps file.pdfand it worked, except that my photos came out all muddy, a result of over compression. So, I added the option to turn off compression,ps2pdf -dEncodeColorImages=false file.ps file.pdfand end up with the wonderfully obtuse error messageError: /undefinedfilename in (false)Operand stack:Execution stack: %interp_exit .runexec2 --nostringval-- --nostringval-- --nostringval-- 2 %stopped_push --nostringval-- --nostringval-- --nostringval-- false 1 %stopped_pushDictionary stack: --dict:1122/1686(ro)(G)-- --dict:0/20(G)-- --dict:70/200(L)--Current allocation mode is localLast OS error: No such file or directoryMiKTeX GPL Ghostscript 8.54: Unrecoverable error, exit code 1Ick.It turns out that ps2pdf on Windows is a batch file, and batch files do not accept = in an argument. I had no idea that this was the case, but so it is. The solution, which is annoyingly absent in the documentation, is to replace = with #. Thus, the command on windows should be,ps2pdf -dEncodeColorImages#false file.ps file.pdfLike that, it works. And, I get my beautiful uncompressed photos in my document. Posted by smithco at 10:52 Email ThisBlogThis!Share to TwitterShare to FacebookShare to Pinterest Labels: bat, batch, compression, LaTeX, pdf, ps, ps2pdf, tip, windows 10 comments: Chico-lama25 January, 2008 04:58I had the same problem, thank you!ReplyDeleteAnonymous31 January, 2008 04:42Me too! Thanks!ReplyDeleteAnonymous01 February, 2008 19:09And me! Thanks a million!ReplyDeleteAnonymous23 April, 2008 06:59ThanksReplyDeleteAnonymous11 December, 2009 01:01Thanks a lot!!! I finally find the solution of my problem!!!!!ReplyDeleteAnonymous13 April, 2010 16:13it is in the docs, at http://pages.cs.wisc.edu/~ghost/doc/cvs/Use.htm#MS_WindowsHowever I found the solution here, and only then remembered seeing something about this, years ago, and dug it up. So thanks for posting :)ReplyDeletematt13 April, 2010
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 6.2 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up ps2pdf Unrecoverable error up vote 0 down vote favorite I have an unrecoverable error, exit code 1 showing up when I try to convert my .ps files to pdf. It worked just about a half http://zkwarl.blogspot.com/2006/12/ps2pdf-tip-how-to-get-around-broken.html hour ago and now it wont. The file is there! Error: /undefinedfilename in (10132012a.ps) Operand stack: Execution stack: %interp_exit .runexec2 --nostringval-- --nostringval-- --nostringval-- 2 %stopped_push --nostringval-- --nostringval-- --nostringval-- false 1 %stopped_push Dictionary stack: --dict:1161/1684(ro)(G)-- --dict:0/20(G)-- --dict:77/200(L)-- Current allocation mode is local Last OS error: 2 GPL Ghostscript 9.04: Unrecoverable error, exit code 1 Here is my command: ps2pdf 10132012a.ps 10132012b.pdf The ps file was created using latex. I am running Ubuntu 11.10. unix latex ghostscript ubuntu-11.10 ps share|improve this question http://stackoverflow.com/questions/13066505/ps2pdf-unrecoverable-error asked Oct 25 '12 at 10:22 drN 55211033 Can you use pdflatex to skip the dvi/ps steps? –lhf Oct 30 '12 at 11:08 @lhf Nope. I am using eps figures. Hence I need to use latex and NOT pdflatex –drN Oct 30 '12 at 16:03 Try dvipdfm or dvipdfmx to skip the dvips step. –lhf Oct 30 '12 at 16:30 @lhf Will do so shortly! Thanks. –drN Oct 30 '12 at 16:49 add a comment| 3 Answers 3 active oldest votes up vote 2 down vote You might try running Ghostscript directly, rather than using the script: gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -o 10132012b.pdf 10132012a.ps or even: gs -sDEVICE=pdfwrite -o 10132012b.pdf - < 10132012a.ps The "convenience" scripts (ps2pdf, pdf2ps, etc) use options which might get in the way (although they really shouldn't). share|improve this answer answered Oct 26 '12 at 15:04 chrisl 26113 Sigh! This didn't work either. But thanks. I should look at my latex file and see if anything wonky is oing on. –drN Oct 26 '12 at 15:40 What error did you get with the second command line? –chrisl Oct 26 '12 at 16:21 add a comment| up vote 0 down vote The error means that ps2pdf could not find the file 10132012a.ps. latex does not create ps files: it creates dvi files which can be converted to ps with dvips. Perhaps you forgot to run dvips
here for a quick overview of the site Help Center Detailed answers http://stackoverflow.com/questions/27454350/ghostscript-unrecoverable-error-undefinedfilename-in-setpagedevice to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business https://bugzilla.redhat.com/show_bug.cgi?id=921706 Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack error /undefined Overflow Community Stack Overflow is a community of 6.2 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up Ghostscript: “Unrecoverable error: undefinedfilename in setpagedevice” up vote 1 down vote favorite I'm trying to compress pdf files using ghostscript like this: gs -sDEVICE=pdfwrite ps2pdf error /undefinedfilename -dPDFSETTINGS=/ebook -dCompatibilityLevel=1.4 -dNOPAUSE -dBATCH -sOutputfile=output.pdf input.pdf I've done this successfully in the past, but for some reason now it won't work. I get the following error: GPL Ghostscript 9.15 (2014-09-22) Copyright (C) 2014 Artifex Software, Inc. All rights reserved. This software comes with NO WARRANTY: see the file PUBLIC for details. **** Unable to open the initial device, quitting. Unrecoverable error: undefinedfilename in setpagedevice Operand stack: true --nostringval-- --nostringval-- --nostringval-- --nostringval-- --nostringval-- --nostringval-- --nostringval-- --nostringval-- [Edit: I fixed the typo from -SOutputFile to -sOutputFile to avoid this red herring. (But that is what some of the comments/answers are referring to.)] pdf ghostscript share|improve this question edited Dec 13 '14 at 16:25 asked Dec 13 '14 at 0:48 emacsomancer 294314 1 -SOutputFile is incorrect, it should be -sOutputFile. Because you haven't specified an output file, you get an undefinedfilename. Not too surprising :-) I strongly recommend that you don'
[x] Format For Printing -XML -Clone This Bug -Last Comment First Last Prev Next This bug is not in your last search results. Bug921706 - ghostscript: /invalidfont in /findfont, --nostringval-- Helvetica Summary: ghostscript: /invalidfont in /findfont, --nostringval-- Helvetica Status: CLOSED ERRATA Aliases: None Product: Fedora Classification: Fedora Component: fontconfig (Show other bugs) Sub Component: --- Version: 20 Hardware: Unspecified Unspecified Priority unspecified Severity unspecified TargetMilestone: --- TargetRelease: --- Assigned To: Akira TAGOH QA Contact: Fedora Extras Quality Assurance Docs Contact: URL: Whiteboard: Keywords: Reopened Depends On: Blocks: ZedoraTracker 919935 Show dependency tree /graph Reported: 2013-03-14 13:57 EDT by Rex Dieter Modified: 2014-07-25 06:05 EDT (History) CC List: 18 users (show) blouin.arno dan fonts-bugs herrold i18n-bugs jskarvad loganjerry manisandro paul pete.hancock pnemade psi-jack redhat-bugzilla tagoh tcallawa tez than twaugh See Also: Fixed In Version: fontconfig-2.10.93-2.fc19 Doc Type: Bug Fix Doc Text: Story Points: --- Clone Of: Environment: Last Closed: 2014-07-10 22:04:42 EDT Type: Bug Regression: --- Mount Type: --- Documentation: --- CRM: Verified Versions: Category: --- oVirt Team: --- RHEL 7.3 requirements from Atomic Host: Cloudforms Team: --- Attachments (Terms of Use) strace output (369.83 KB, text/plain) 2013-09-18 04:51 EDT, Dan HorĂ¡k no flags Details snip from /var/log/cups/error_log (15.62 KB, text/plain) 2014-07-04 05:07 EDT, Hankenstein no flags Details Add an attachment (proposed patch, testcase, etc.) Groups: None (edit) Description Rex Dieter 2013-03-14 13:57:33 EDT Working on enblend FTBFS on rawhide, https://koji.fedoraproject.org/koji/taskinfo?taskID=5122547 According to root.log: ghostscript-9.06-7.fc19 and pdf generation via fig2dev is fail