Graphics, Figures & TablesCannot use eps file

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

Cannot use eps file

Post by zzzhhh »

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.
[Loading MPS to PDF converter (version 2006.09.02).]
)

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}
&

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
LaTeX Beginner's Guide LaTeX Cookbook LaTeX TikZ graphics TikZによるLaTeXグラフィックス
User avatar
Stefan Kottwitz
Site Admin
Posts: 10290
Joined: Mon Mar 10, 2008 9:44 pm

Cannot use eps file

Post by Stefan Kottwitz »

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
LaTeX.org admin
zzzhhh
Posts: 11
Joined: Tue May 30, 2017 4:45 pm

Cannot use eps file

Post by zzzhhh »

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.
User avatar
Stefan Kottwitz
Site Admin
Posts: 10290
Joined: Mon Mar 10, 2008 9:44 pm

Cannot use eps file

Post by Stefan Kottwitz »

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
LaTeX.org admin
zzzhhh
Posts: 11
Joined: Tue May 30, 2017 4:45 pm

Cannot use eps file

Post by zzzhhh »

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.
User avatar
Stefan Kottwitz
Site Admin
Posts: 10290
Joined: Mon Mar 10, 2008 9:44 pm

Cannot use eps file

Post by Stefan Kottwitz »

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
LaTeX.org admin
zzzhhh
Posts: 11
Joined: Tue May 30, 2017 4:45 pm

Cannot use eps file

Post by zzzhhh »

Yes, it is path problem. If I put the eps file in the document folder and remove the folder path as you suggested, everything is fine. Thank you again for your help.
Post Reply