4

I updated TeXworks via MikTeX several months ago and now get the following warning message every time I try to use epstopdf: "PDF inclusion: found PDF version <1.7>, but at most version <1.5> allowed"

I had no issues prior to updating. Here is a MWE:

\documentclass[12pt]{article}

\usepackage{graphicx}
\usepackage{epstopdf}

\begin{document}

\begin{figure}
 \includegraphics[width=5in]{Phaselock.eps} 
\end{figure}

\end{document}

The eps file can be found here: https://drive.google.com/file/d/1Gx5khDOo4Vovz0Z8TFV6CpNpQF3fuk20/view?usp=sharing

I have already tried using \pdfminorversion=7 before the document class line, immediately after the document class line, and immediately before \begin{document}. In this case, I no longer get the message about the PDF version, but the PDF file that is created of the eps figure is not what it should be (the fonts are blocky and the scale on the axes of the graph overlap the axis.) I have pasted the contents of the log file after running the above code with \pdfminorversion=7 immediately before \begin{document}. I am out of ideas, and I have tried several other suggested lines of code from other posts like:

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

Any help is much appreciated!!

Log file starts here:

This is pdfTeX, Version 3.14159265-2.6-1.40.21 (MiKTeX 2.9.7350 64-bit) (preloaded format=pdflatex 2020.3.24)  11 MAY 2020 17:24
entering extended mode
**./TestEpsToPDFMWE.tex
(TestEpsToPDFMWE.tex
LaTeX2e <2020-02-02> patch level 5
L3 programming layer <2020-03-06>
("C:\Users\Kelsey\AppData\Local\Programs\MiKTeX 2.9\tex/latex/base\article.cls"
Document Class: article 2019/12/20 v1.4l Standard LaTeX document class
("C:\Users\Kelsey\AppData\Local\Programs\MiKTeX 2.9\tex/latex/base\size12.clo"
File: size12.clo 2019/12/20 v1.4l Standard LaTeX file (size option)
)
\c@part=\count167
\c@section=\count168
\c@subsection=\count169
\c@subsubsection=\count170
\c@paragraph=\count171
\c@subparagraph=\count172
\c@figure=\count173
\c@table=\count174
\abovecaptionskip=\skip47
\belowcaptionskip=\skip48
\bibindent=\dimen134
)
("C:\Users\Kelsey\AppData\Local\Programs\MiKTeX 2.9\tex/latex/graphics\graphicx
.sty"
Package: graphicx 2019/11/30 v1.2a Enhanced LaTeX Graphics (DPC,SPQR)

("C:\Users\Kelsey\AppData\Local\Programs\MiKTeX 2.9\tex/latex/graphics\keyval.s
ty"
Package: keyval 2014/10/28 v1.15 key=value parser (DPC)
\KV@toks@=\toks15
)
("C:\Users\Kelsey\AppData\Local\Programs\MiKTeX 2.9\tex/latex/graphics\graphics
.sty"
Package: graphics 2019/11/30 v1.4a Standard LaTeX Graphics (DPC,SPQR)

("C:\Users\Kelsey\AppData\Local\Programs\MiKTeX 2.9\tex/latex/graphics\trig.sty
"
Package: trig 2016/01/03 v1.10 sin cos tan (DPC)
)
("C:\Users\Kelsey\AppData\Local\Programs\MiKTeX 2.9\tex/latex/graphics-cfg\grap
hics.cfg"
File: graphics.cfg 2016/06/04 v1.11 sample graphics configuration
)
Package graphics Info: Driver file: pdftex.def on input line 105.

("C:\Users\Kelsey\AppData\Local\Programs\MiKTeX 2.9\tex/latex/graphics-def\pdft
ex.def"
File: pdftex.def 2018/01/08 v1.0l Graphics/color driver for pdftex
))
\Gin@req@height=\dimen135
\Gin@req@width=\dimen136
)
("C:\Users\Kelsey\AppData\Local\Programs\MiKTeX 2.9\tex/latex/epstopdf-pkg\epst
opdf.sty"
Package: epstopdf 2020-01-24 v2.11 Conversion with epstopdf on the fly (HO)

("C:\Users\Kelsey\AppData\Local\Programs\MiKTeX 2.9\tex/generic/infwarerr\infwa
rerr.sty"
Package: infwarerr 2019/12/03 v1.5 Providing info/warning/error messages (HO)
)
("C:\Users\Kelsey\AppData\Local\Programs\MiKTeX 2.9\tex/latex/grfext\grfext.sty
"
Package: grfext 2019/12/03 v1.3 Manage graphics extensions (HO)

("C:\Users\Kelsey\AppData\Local\Programs\MiKTeX 2.9\tex/generic/kvdefinekeys\kv
definekeys.sty"
Package: kvdefinekeys 2019-12-19 v1.6 Define keys (HO)
))
("C:\Users\Kelsey\AppData\Local\Programs\MiKTeX 2.9\tex/latex/kvoptions\kvoptio
ns.sty"
Package: kvoptions 2019/11/29 v3.13 Key value format for package options (HO)

("C:\Users\Kelsey\AppData\Local\Programs\MiKTeX 2.9\tex/generic/ltxcmds\ltxcmds
.sty"
Package: ltxcmds 2019/12/15 v1.24 LaTeX kernel commands for general use (HO)
)
("C:\Users\Kelsey\AppData\Local\Programs\MiKTeX 2.9\tex/generic/kvsetkeys\kvset
keys.sty"
Package: kvsetkeys 2019/12/15 v1.18 Key value parser (HO)
))
("C:\Users\Kelsey\AppData\Local\Programs\MiKTeX 2.9\tex/latex/pdftexcmds\pdftex
cmds.sty"
Package: pdftexcmds 2019/11/24 v0.31 Utility functions of pdfTeX for LuaTeX (HO
)

("C:\Users\Kelsey\AppData\Local\Programs\MiKTeX 2.9\tex/generic/iftex\iftex.sty
"
Package: iftex 2020/03/06 v1.0d TeX engine tests
)
Package pdftexcmds Info: \pdf@primitive is available.
Package pdftexcmds Info: \pdf@ifprimitive is available.
Package pdftexcmds Info: \pdfdraftmode found.
)
("C:\Users\Kelsey\AppData\Local\Programs\MiKTeX 2.9\tex/latex/epstopdf-pkg\epst
opdf-base.sty"
Package: epstopdf-base 2020-01-24 v2.11 Base part for package epstopdf
Package epstopdf-base Info: Redefining graphics rule for `.eps' on input line 4
85.
Package grfext Info: Graphics extension search list:
(grfext)             [.pdf,.png,.jpg,.mps,.jpeg,.jbig2,.jb2,.PDF,.PNG,.JPG,.JPE
G,.JBIG2,.JB2,.eps]
(grfext)             \AppendGraphicsExtensions on input line 504.
))
("C:\Users\Kelsey\AppData\Local\Programs\MiKTeX 2.9\tex/latex/l3backend\l3backe
nd-pdfmode.def"
File: l3backend-pdfmode.def 2020-03-12 L3 backend support: PDF mode
\l__kernel_color_stack_int=\count175
\l__pdf_internal_box=\box45
)
No file TestEpsToPDFMWE.aux.
\openout1 = `TestEpsToPDFMWE.aux'.

LaTeX Font Info:    Checking defaults for OML/cmm/m/it on input line 6.
LaTeX Font Info:    ... okay on input line 6.
LaTeX Font Info:    Checking defaults for OMS/cmsy/m/n on input line 6.
LaTeX Font Info:    ... okay on input line 6.
LaTeX Font Info:    Checking defaults for OT1/cmr/m/n on input line 6.
LaTeX Font Info:    ... okay on input line 6.
LaTeX Font Info:    Checking defaults for T1/cmr/m/n on input line 6.
LaTeX Font Info:    ... okay on input line 6.
LaTeX Font Info:    Checking defaults for TS1/cmr/m/n on input line 6.
LaTeX Font Info:    ... okay on input line 6.
LaTeX Font Info:    Checking defaults for OMX/cmex/m/n on input line 6.
LaTeX Font Info:    ... okay on input line 6.
LaTeX Font Info:    Checking defaults for U/cmr/m/n on input line 6.
LaTeX Font Info:    ... okay on input line 6.

("C:\Users\Kelsey\AppData\Local\Programs\MiKTeX 2.9\tex/context/base/mkii\supp-
pdf.mkii"
[Loading MPS to PDF converter (version 2006.09.02).]
\scratchcounter=\count176
\scratchdimen=\dimen137
\scratchbox=\box46
\nofMPsegments=\count177
\nofMParguments=\count178
\everyMPshowfont=\toks16
\MPscratchCnt=\count179
\MPscratchDim=\dimen138
\MPnumerator=\count180
\makeMPintoPDFobject=\count181
\everyMPtoPDFconversion=\toks17
)
Package epstopdf Info: Source file: <Phaselock.eps>
(epstopdf)                    date: 2018-11-12 17:04:11
(epstopdf)                    size: 9144 bytes
(epstopdf)             Output file: <Phaselock-eps-converted-to.pdf>
(epstopdf)             Command: <epstopdf --outfile=Phaselock-eps-converted-to.
pdf Phaselock.eps>
(epstopdf)             \includegraphics on input line 9.
runsystem(epstopdf --outfile=Phaselock-eps-converted-to.pdf Phaselock.eps)...ex
ecuted (allowed).

Package epstopdf Info: Result file: <Phaselock-eps-converted-to.pdf>
(epstopdf)                    date: 2020-05-11 17:24:29
(epstopdf)                    size: 6224 bytes.
<Phaselock-eps-converted-to.pdf, id=1, 523.9575pt x 414.54875pt>
File: Phaselock-eps-converted-to.pdf Graphic file (type pdf)
<use Phaselock-eps-converted-to.pdf>
Package pdftex.def Info: Phaselock-eps-converted-to.pdf  used on input line 9.
(pdftex.def)             Requested size: 361.34999pt x 285.89978pt.
 [1{C:/Users/Kelsey/AppData/Local/MiKTeX/2.9/pdftex/config/pdftex.map} <./Phase
lock-eps-converted-to.pdf>] (TestEpsToPDFMWE.aux) ) 
Here is how much of TeX's memory you used:
 1613 strings out of 480934
 26224 string characters out of 2899449
 259040 words of memory out of 3000000
 17497 multiletter control sequences out of 15000+200000
 532636 words of font info for 25 fonts, out of 3000000 for 9000
 1141 hyphenation exceptions out of 8191
 30i,5n,27p,215b,213s stack positions out of 5000i,500n,10000p,200000b,50000s
<C:/Users/Kelsey/AppData/Loc
al/Programs/MiKTeX 2.9/fonts/type1/public/amsfonts/cm/cmr12.pfb>
Output written on TestEpsToPDFMWE.pdf (1 page, 12810 bytes).
PDF statistics:
 16 PDF objects out of 1000 (max. 8388607)
 0 named destinations out of 1000 (max. 500000)
 6 words of extra memory for PDF output out of 10000 (max. 10000000)
moewe
  • 175,683
Kelsey
  • 101
  • 1
  • 5
  • both of your tries work for me in a current miktex, setting \pdfminorversion will make everything pdf 1.7, and your \epstopdfDeclareGraphicsRule will force the created eps to be pdf 1.5. The output looks ok to me. But your eps is not embedding a font, it simply refers to Helvetica, so it can depend on your pdf viewer how it looks. – Ulrike Fischer May 12 '20 at 08:02
  • @UlrikeFischer I created the eps file in MATLAB 2013 (I have not paid to upgrade to a newer version). When I create the LaTex file including the figure, the font displays terribly and the scale on the axis overlaps the axis. Are you suggesting that the issue may be with the creation of the eps file in MATLAB? – Kelsey May 12 '20 at 17:46
  • Here is a link to the epstopdf file to demonstrate the issue that I'm seeing( https://drive.google.com/file/d/1DSfPGF1M5lC7UZXy6taaCK5617xuLY4o/view?usp=sharing). The figure converted correctly to PDF before I updated TeXworks. – Kelsey May 12 '20 at 17:54
  • And this (https://drive.google.com/file/d/18fwMTJiFGtJqOfp63zPiWhL5i-60xIZX/view?usp=sharing) is the PDF of the figure that I created directly in MATLAB. Could the issue be that Latex doesn't have the font that is needed to correctly render the figure? If so, how can I add a font to Latex? – Kelsey May 12 '20 at 18:03
  • 1
    oh this. Install in the miktex console all packages that looks like fonts (urw etc), something is missing in the basic set. – Ulrike Fischer May 12 '20 at 18:24
  • 1
    see here https://tex.stackexchange.com/a/537620/2388 – Ulrike Fischer May 12 '20 at 19:16
  • @UlrikeFischer I went to the MikTeX console to find font packages. When I searched fonts, there are over 100 fonts. I know that I didn't have all of them installed previously. How can I tell which ones I actually need? I've spent some time Googling this, and couldn't find a good answer. – Kelsey May 12 '20 at 21:59
  • 2
    Oh my goodness! I figured it out: I needed to install the helvetic package. Now it is correctly converting my figures from eps to pdf. And the original warning PDF inclusion: found PDF version <1.7>, but at most version <1.5> allowed is fixed by adding \pdfminorversion=7 Thank you for helping me track down the real issue! – Kelsey May 12 '20 at 22:04
  • @Kelsey I am glad to see you resolved the issue. Just to comment on "How can I tell which ones I actually need?" Either check if epstopdf reported any invalid font, or the Fonts list in PDF properties (look for non-embedded ones). Once you detect them, check the Fontmap.MiKTeX entries and eventually use the filter in the MiKTeX's Package manager. Check here: https://github.com/MiKTeX/miktex-packaging/issues/112#issuecomment-577104722 – ivankokan May 13 '20 at 20:26

2 Answers2

6

It turned out that the real issue was that I didn't have the helvetic package installed.The \pdfminorversion=7 solution does work, and now the fonts in the PDF are correct thanks to the helvetic package. Thanks to @UlrikeFischer for pointing me to the real issue and correcting my assumption about the source of my issue.

Kelsey
  • 101
  • 1
  • 5
1

The following example successfully compiles with pdflatex. You may need to delete the Phaselock-eps-converted-to.pdf file before compiling.

Note:

  • There is no need to load epstopdf package, since graphicx now auto loads epstopdf-base package.
  • And the file extension (.eps) can be omitted.
\documentclass{article}
\usepackage{graphicx}

\begin{document}
\begin{figure}
\includegraphics[width=5in]{Phaselock}
\end{figure}
\end{document}

This is what I get: enter image description here

muzimuzhi Z
  • 26,474
  • Yes, I have already deleted the Phaselock-eps-converted-to.pdf file before I try to compile again. With my version of TeXworks, I get the error that I originally asked about. Whether or not I use \pdfminorversion=7, the figure displays incorrectly. I generated the eps file with MATLAB 2013, and the axis scale and labels display with the wrong font and the axis scale overlaps the axis. See here: https://drive.google.com/file/d/1DSfPGF1M5lC7UZXy6taaCK5617xuLY4o/view?usp=sharing. – Kelsey May 12 '20 at 17:52
  • To clarify, here is a link to a PDF of the figure when I save the figure as a PDF directly from MATLAB: https://drive.google.com/file/d/18fwMTJiFGtJqOfp63zPiWhL5i-60xIZX/view?usp=sharing – Kelsey May 12 '20 at 18:02
  • @Kelsey I have attached the result I get from my example. Do the font and axis scale what you want? And, which latex distribution and which version of it do you use? – muzimuzhi Z May 12 '20 at 18:26
  • @Kelsey I can successfully include the PDF you provided, although it has wide white margin hence not very useful. I am using TeX Live 2020 with latest packages on macOS. I have no access to MATLAB, maybe you can output cropped (aka without extra white margin) pdf directly from MATLAB. – muzimuzhi Z May 12 '20 at 18:33
  • Yes, the image that you included is what it is supposed to look like - that is not what I get on my computer. I think this is the answer to your question: This is pdfTeX, Version 3.14159265-2.6-1.40.21 (MiKTeX 2.9.7400 64-bit) (preloaded format=pdflatex 2020.5.12) I have countless figures in tex documents that I'm working on, so I need epstopdf to work reliably. Thanks for the suggestion though. – Kelsey May 12 '20 at 21:58