## LaTeX forum ⇒ Graphics, Figures & Tables ⇒ Cannot use eps file Topic is solved

Information and discussion about graphics, figures & tables in LaTeX documents.
zzzhhh
Posts: 11
Joined: Tue May 30, 2017 4:45 pm

### Cannot use eps file

I am using Texworks 0.6.1, MiKTeX 2.9, MPS to PDF converter version 2006.09.02 and I have added \usepackage{epstopdf} at the beginning. Below is the error I got. The wanted pics/........-eps-converted-to.pdf does not exist (I omitted the filename). The log file epstopdf.log is empty. I have no idea what the error message is talking about. Could you please help me fix this problem? Thanks a lot.

)

Package hyperref Warning: Height of page (\paperheight) is invalid (0.0pt),
(hyperref) using 11in.

("C:\Users\hzhou3\AppData\Local\Programs\MiKTeX 2.9\tex\latex\hyperref\nameref.
sty"
("C:\Users\hzhou3\AppData\Local\Programs\MiKTeX 2.9\tex\generic\oberdiek\gettit
lestring.sty"))
(C:/........tex
("C:\Users\hzhou3\AppData\Local\Programs\MiKTeX 2.9\tex\latex\psnfss\ot1phv.fd"
)MiKTeX GPL Ghostscript 9.19: **** Could not open the file pics/........-eps-converted-to.pdf .
**** Unable to open the initial device, quitting.

Sorry, but "MiKTeX EPS-to-PDF Converter" did not succeed.

The log file hopefully contains the information to get MiKTeX going again:

C:/Users/hzhou3/AppData/Local/MiKTeX/2.9/miktex/log/epstopdf.log

You may want to visit the MiKTeX project page, if you need help.

! Package pdftex.def Error: File `pics/drift_trajectory-eps-converted-to.pdf' n
ot found.

See the pdftex.def package documentation for explanation.
Type H <return> for immediate help.
...

l.29 ...=0.5\textwidth]{pics/drift_trajectory.eps}
&

Tags:

Stefan Kottwitz
Posts: 9445
Joined: Mon Mar 10, 2008 9:44 pm
Welcome to the forum!

Can you please post the file C:/Users/hzhou3/AppData/Local/MiKTeX/2.9/miktex/log/epstopdf.log, as attachment here?

When writing, there's an "Attachments" link / tab below the edit field that you can use.

Stefan

zzzhhh
Posts: 11
Joined: Tue May 30, 2017 4:45 pm
As I said, this log file is empty. By empty it means the file size is 0 byte. I tried deleting this file and re-compile, then I got the same error and the same empty log file.

Stefan Kottwitz
Posts: 9445
Joined: Mon Mar 10, 2008 9:44 pm
You could add epstopdf manually at the command prompt (cmd), perhaps with option --trace

epstopdf --trace pics/drift_trajectory.eps

Take a look if the pdf might be in the document folder instead of the pics/ subfolder. Perhaps put the images directly into the document folder and also remove the pics path in \includegraphics, if working with the subfolder doesn't succeed. At least with one image for testing.

Stefan

zzzhhh
Posts: 11
Joined: Tue May 30, 2017 4:45 pm
Yes, I successfully got the pdf I want by following your instructions. Thank you very much.

But it is awkward since I need to convert it manually for every eps file. Is it possible to fix it somewhere so that the conversion can be conducted automatically inside WinEdt? Thanks a lot.

Stefan Kottwitz
Posts: 9445
Joined: Mon Mar 10, 2008 9:44 pm
Perhaps there's an issue with the path, as I thought, and all would work automatically within the same path.

Otherwise no idea - conversion is just one time, so maybe just do it... if it's a lot of files, it could be done in a .bat script or another script instead of converting all manually.

Stefan