Using XeLaTeX I am trying to add a PDF to my file. Only the first page the PDF is included in the output file.

The following MWE refers to a PDF I created using Apple's TextEdit and 'Save as PDF' from the Print dialog. The contents are simply: 'Page 1', 'Page 2' etc. on each page.



\title{Minimal Working Example}


\section{Section 1}



3 Answers 3


According to the pdfpages documentation, this is the default behavior when including pdfs with \includepdf. In order to get all the pages, you need to type:

  • Can this be the default somehow? Jul 9, 2020 at 22:14
  • 2
    \includepdfset{pages=-} for setting global options Feb 14, 2021 at 15:07

I've observed the issue you describe even with the [pages=-] option provided. pdflatex worked as expected, but xelatex only included the first page, and even failed with an error if I explicitly set the page range to include the second page of my multi-page PDF:

Package pdfpages Error: page 2 of `142952.PDF' does not exist.

The issue turned out to be triggered by an upper-case file extension (i.e., .PDF) on a case-sensitive file system.

Changing the file name from 142952.PDF to 142952.pdf solved the problem with XeLaTeX. And of course, if the file extension is lower-case .pdf, it can also be omitted in the \includepdf argument.


In my case (Linux) it had problem when file contained . or - before .pdf. Renaming helped.

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.