Including a PDF for dvi output

2,182

You can convert the PDF file to EPS files. Either you select page by page or depending on the converter this can be done in one conversion pass.

pdftops (from xpdf) knows the following options that are useful here:

  • -f <int> specifies the first page
  • -l <int> specifies the last page
  • -eps converts to EPS

Command line for the second page of test.pdf written to test02.eps:

pdftops -eps -f 2 -l 2 test.pdf test02.eps

ghostscript can select pages and write to multiple output files. Example from above:

gs -dBATCH -dNOPAUSE -sDEVICE=epswrite -sOutputFile=test%02d.eps

This writes files test01.eps, test02.eps, and test03.eps. %02d means, the page number with at least two digits are written with a leading zero if necessary (numbers < 10).

Also single pages can selected with ghostscript:

gs -dBATCH -dNOPAUSE -sDEVICE=epswrite -dFirstPage=2 -dLastPage=2 -sOutputFile=test02.eps test.pdf

Also -sOutputFile=test%02d.eps can be used here, %02d will be replaced by the page number 02.

Share:
2,182

Related videos on Youtube

David Carlisle
Author by

David Carlisle

Updated on November 08, 2020

Comments

  • David Carlisle
    David Carlisle about 3 years

    I want to include a multipage-pdf in latex and get .dvi output. I know \include{pdfpages} only works with pdfLaTeX. I can't convert PDF to .eps since it is multi-page. I want to have .dvi output with a PDF included. Any way to do that?

    • Joseph Wright
      Joseph Wright over 11 years
      Why do you need .dvi output? Why not split the PDF into separate pages and convert each to .eps format?
    • imriss
      imriss almost 10 years
      I have the same question. I want to embed a the PDF output of a Latex document into another one (with the ability to select the range of pages to be included). Using PDFLatex compiler, it is easy using the 'pdfpages' package. However, now I need to do it with Latex compiler for a document.