# How to make PDF1.5 with epstopdf?

I have a couple of .eps-files that I include in my document with the \includegraphics{} macro. Obviously, this macro will call epstopdf that converts the .eps-file into .pdf, that will then be included.

Now, when compiling my document I see this in the log file:

pdfTeX warning: pdflatex (file ./symbols/sym_full_bridge_rectifier-eps-converted-to.pdf): PDF inclusion: found PDF version <1.7>, but at most version <1.5> allowed


Reading the epstopdf-manual on this link I am informed that I can change the PDF-version of the converted files using the option --gsopt=-dCompatibilityLevel=1.5. This is easily done in a terminal. I have been looking for a way to globally alter ghostscript-options (in a .rc-file or similiar) but I fail.

So, how do I pass that option from within my LaTeX-document?

You can change the command line used with epstopdf by declaring a new graphics rule for eps files.

\documentclass{article}
\usepackage{graphicx}
\usepackage{epstopdf}
\epstopdfDeclareGraphicsRule{.eps}{pdf}{.pdf}{%
repstopdf --gsopt=-dCompatibilityLevel=1.5 #1 \OutputFile}
\begin{document}
\includegraphics{example.eps}
\end{document}

• Somehow this does not work for me. I still get complains about PDF1.7-files. – bos Mar 18 at 21:37
• @bos, does --gsopt=-dCompatibilityLevel=1.5 actually do what you want? If you convert the EPS directly with epstopdf do you get a PDF 1.7 or 1.5 file? If it's 1.5, then your problem lies elsewhere. – David Purton Mar 19 at 0:20
• @bos, as far as I can see the default for epstopdf is PDF-1.5. So changing this setting shouldn't make any difference. – David Purton Mar 19 at 0:24
• You're right. I ran epstopdf manually and got a PDF-1.5. So, something in my setup (Debian 9) makes epstopdf produce PDF-1.7 when invoked from pdftex. Trying to track it down seems like a big hurdle. – bos Mar 21 at 10:23

I had the same problem and tried the answer by David Purton. This did not work for me and gave the following error:

Package pdftex.def Error: File figure-eps-converted-to.pdf' not found: using draft setting. \includegraphics{figure.eps}


I came up with the following solution by comparing the epstopdf commands in the log file:

\documentclass{article}
\usepackage{graphicx}
\usepackage{epstopdf}
\epstopdfDeclareGraphicsRule{.eps}{pdf}{.pdf}{%
epstopdf --gsopt=-dCompatibilityLevel=1.5 #1 --outfile=\OutputFile}

\begin{document}
\includegraphics{figure.eps}
\end{document}


I tried to add a comment to David Purton's answer, because I do not think my answer is very different from his, but I do not have enough reputation to do that.

• The difference is the --outfile=` – guhur Sep 9 at 12:59