4

I use TexLive and compile with lualatex. I have some eps-images included, which get automatically converted to pdf files. (I assume TexLive does it, because I do not use the package epstopdf).

Everything works fine, unless that the generated pdfs are version 1.7 and I get a warning that this version is too high.

How do I automatically generate 1.4 pdfs, and why 1.7 pdfs are generated at all?.


Edit: If I add the package eps2pdf to my code, the produced pdfs are also version 1.7.

Versions of my programs:

pdfTeX 3.14159265-2.6-1.40.16 (TeX Live 2015/Debian)
kpathsea version 6.2.1
Compiled with libpng 1.6.17; using libpng 1.6.17
Compiled with zlib 1.2.8; using zlib 1.2.8
Compiled with poppler version 0.41.0

LuaTeX, Version beta-0.80.0 (TeX Live 2015/Debian) (rev 5238)

Edit: I misread the error Latex error message, but it merely makes a difference. The message says that at most v1.5 is allowed (not v1.4 as I posted originally).

Here is a MWE.

\documentclass{scrbook}
\usepackage{graphicx}
%\usepackage{epstopdf}
\begin{document}
    \includegraphics{mwe3.eps}
\end{document}

The eps file is at: http://www.filedropper.com/mwe3

The converted file ist at: http://www.filedropper.com/mwe3-eps-converted-to

tommsch
  • 429
  • Just for debugging the problem: do you also get 1.7 if you manually use epspdf to convert one of your eps to pdf? – book Dec 03 '18 at 09:59
  • texlive produces by default 1.5, miktex 1.7. Are you really using texlive? – Ulrike Fischer Dec 03 '18 at 10:03
  • texlive 2015 is much too old for debugging (and I can't reproduce your problem with it either). – Ulrike Fischer Dec 03 '18 at 10:10
  • I think (but could be wrong) that may be a GS default and somewhere you may need to add -dCompatibilityLevel=1.4 possibly via a gscmd switch –  Dec 03 '18 at 15:57
  • @KJO, with somewhere you mean in some configuration file, or in the code of my document? – tommsch Dec 03 '18 at 16:24
  • I seem to be wrong in that the pdf is generated without GS and as Ulrike has commented just tested version of PDF built by TeX Live 2018 is PDF 1.5 by default ! –  Dec 03 '18 at 17:28
  • Without a MWE showing the steps you are using (some may change PDF version to match embedded requirements) and a sample eps to see how that is converted (e.g. eps2pdf usually uses GhostScript) it is difficult to emulate your experience. the GS parameters may be modified in some editors but would generally be applied at shell command line level –  Dec 03 '18 at 18:08
  • Tommsch thanks for the mwe however my results seem different to those you describe (I am of course using a different system but default functions should be the same) the eps to pdf you link to is indeed 1.7 as produced from matlab by your gs 9.26 -- it is really odd as my results LuaTeX, Version 1.07.0 (TeX Live 2018/W32TeX) (format=lualatex 2018.10.8) -- epstopdf-base 2016/05/15 v2.6 -- pdftexcmds 2018/09/10 v0.29 Utility -- latex/latexconfig/epstopdf-sys.cfg which using my unmodified GS 9.25 defaults to PDF version 1.5 for both the intermediate and final file == I do not have matlab –  Dec 04 '18 at 10:06
  • In summary, thanks for including the eps-pdf conversion since that indicates that GhostScript has somehow been modified by matlab to produce PDF of version 1.7. I do not know if there may be a setting in matlab to change default to 1.5. Solutions 1) use a different GS for Latex (problematic keeping two) 2) find the setting in gs config or matlib config and change on the fly or via scripting. –  Dec 04 '18 at 10:27
  • Once you track down the setting (that is causing the version mismatch) you can self answer so that other TeX users with matlab.eps as an input can see if their settings cause similar problems. i.e. upping the eps-converted.pdf that is the TeX \includegraphics and how that seems to impact the LaTeX PDF output. –  Dec 04 '18 at 17:32
  • @KJO Thank you very much for your patient help. How do I track down the setting, where to start? – tommsch Dec 05 '18 at 10:25
  • Sorry for delay, working on other projects, I don't use matlab thus no idea how to change its settings. GS has many variants its tough to point you in the right direction this question https://superuser.com/questions/435410/where-are-ghostscript-options-switches-documented shows many locations but setting you need to find is likely /CompatibilityLevel 1.7 that may have been set by matlab. Your Q shows Debian, I use windows I cant say which folders settings may be stored in. But if I convert eps to pdf by open/save in SumatraPDF it saves as PDFv1.5 then \including result gives final v1.5.PDF –  Dec 05 '18 at 15:59

0 Answers0