I want to add a multipage pdf file to my latex document. However, due to some packages that uses eps files I can not use PDFLatex. Instead I use Latex >> ps2pdf. \includepdf does not work under these conditions.

Any thoughts on how to solve this problem?

  • 1
    pdflatex handles eps ok, it nowadays converts it on-the-fly to pdf. – Ulrike Fischer Aug 23 '18 at 14:21
  • But my package uses eps files and replace a text variable like TMP in them with a number (flexible numbering of chemical structures). Therefore, it needs them as eps during compiling – stone666 Aug 23 '18 at 14:23
  • 3
    Ah. You are using psfrag. You could try the pstool package to get this working with pdflatex. Read the documentation! – Ulrike Fischer Aug 23 '18 at 14:37
  • Welcome to TeX.SX! You can have a look at our starter guide to familiarize yourself further with our format. – Martin Schröder Aug 24 '18 at 7:41

You could use versions of psfrag that work with pdftex, but if you want to keep the latex/dvips/ps2pdf workflow you can convert the PDF to a sequence of eps files, for example the standard latex example document sample2e.pdf is 3 pages, a command sequence such as

pdftops -eps -f 1 -l 1 sample2e.pdf sample2e-1.eps
pdftops -eps -f 2 -l 2 sample2e.pdf sample2e-2.eps
pdftops -eps -f 3 -l 3 sample2e.pdf sample2e-3.eps

pdftops is part of the widely available poppler tools

produces three EPS files sample2e-1.eps, sample2e-3.eps, sample2e-3.eps one for each page of the document, that you can then include into latex using graphicx in the usual way.

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.