2

I am using eps graph for my work. Latex version is TeXstudio 2.12.10, Miktex 2.9. Code to include graph

\begin{subfigure}{.48\textwidth}
    \includegraphics*[width=\linewidth,keepaspectratio=false]{Graph1a.eps}  
    \caption{$T_d$ under various $V_m$ }
\end{subfigure}

I have included \usepackage{epstopdf} but still, it gives me the error

MiKTeX GPL Ghostscript 9.19: Unrecoverable error, exit code 1 xdvipdfmx:fatal: pdf_ref_obj(): passed invalid object. Output file removed.

Any, help is appreciated.

1
  • can you provide the image Graph1a.eps for a test?
    – user2478
    Sep 11 '18 at 8:08
1

I have no problem whle compiling this file, called test.tex, under MiKTeX:

\documentclass{article}
\usepackage[pdftex]{graphicx}
\usepackage{epstopdf}
\begin{document}
  \includegraphics*[width=\linewidth,keepaspectratio=false]{FIG1.eps}  
\end{document}

Note, however, that, as stated at the epstodpf package dosumentation, the command line should be:

pdflatex --enable-write18 test.tex

2
  • 1
    shell-escape is not needed! epstopdf is one of the allowed external programs
    – user2478
    Sep 11 '18 at 10:33
  • 1
    actually it's repstopdf, a restricted version of epstopdf that's allowed. Also, use the graphicx package rather than the epstopdf package. Sep 11 '18 at 19:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.