In my appendix, I want to add several PDF documents (questionnaires) which I used in a study. I managed to implement an appendix and include the PDF files (not hard to do), but now I have two issues I cannot solve:

  1. I would like to see that the first page of my PDF is placed directly below the title of my appendix A. Yet, appendix A is standing solo on the beginning of the page, then a lot of unused space followes, followed by the next page with the content of the PDF.
  2. At the moment, the PDF pages are covering the header of the sections (A Appendix). I would like to see the headers followed by the PDF pages ... Is this even possible?
\section{Appendix A}


  • The issue is that pdfpages by design imports the pages each on their own page. Is there a reason you can't build the whole document all together, instead of piecing them together afterwards?
    – cslstr
    Commented May 9, 2014 at 0:04
  • 1
    Perhaps Includepdf as a figure or A: Caption / Description / Footnote for pdfpages could help?
    – cslstr
    Commented May 9, 2014 at 0:09
  • 1
    tex.stackexchange.com/a/160677/39222 is my answer to a slightly different question but the problem is essentially similar. It demonstrates how to include a PDF page with the chapter header and headings appearing. (It involves multiple logical pages per physical page so it complicates but you could cut that stuff as you don't need it.)
    – cfr
    Commented May 9, 2014 at 0:38
  • 1
    @cfr It would not solve the first part of the question; a full page section heading would still be necessary. But \pdfpages could include the external PDF full page with headers. To include section headers, the external doc would have to be scaled down as you have shown.
    – cslstr
    Commented May 10, 2014 at 2:14
  • 1
    @cslstr Indeed. That's what my solution does except that I use a scaling factor. Of course, if the PDFs are such that there is already room for the headers, you can just set the scaling factor to 1 for that case to avoid unnecessary reductions in size. However, if they were produced in Word, they are likely to have smaller margins than the LaTeX document so I suspect some scaling may be necessary. If you are going to do this for a bunch of PDFs, though, it is useful to wrap the command in a macro for the sake of consistency and easy adjustment.
    – cfr
    Commented May 10, 2014 at 2:20

4 Answers 4


Here is an adapted version of the code given in the answer I linked to. You will need to adjust this depending on the class and packages you are using and on how full the pages of your PDFs are. The code below is conservative and assumes the pages are quite full though the sample PDF I included doesn't meet this requirement so the pages look too empty. I'm guessing your PDFs are fuller but obviously that's just a guess.


\NewDocumentCommand\headerspdf{ O {pages=-} m }{% [options for include pdf]{filename.pdf}
\NewDocumentCommand\secpdf{somO{1}m}{% [short title]{section title}[page specification]{filename.pdf} --- possibly starred




\secpdf*{PDF on Starred Section Page}[3]{/usr/local/texlive/2013/texmf-dist/doc/latex/mwe/mwe.pdf}

\section{Include PDF after Section Page}

\secpdf{PDF on Section Page}[4]{/usr/local/texlive/2013/texmf-dist/doc/latex/mwe/mwe.pdf}

\secpdf[Short Title]{PDF on Section Page with Short Title}{/usr/local/texlive/2013/texmf-dist/doc/latex/mwe/mwe.pdf}


Sample output:

PDF following section heading with headings

  • thanks for your help. the preamble + the code \secpdf[Short Title]{PDF on Section Page with Short Title}{Example.pdf} works very well so far, the whole page is shown perfectly on the page... only problem: if I add a pdf with more than one page, it only displays first page, rest is not shown up. how can I solve this issue?
    – Jens
    Commented May 9, 2014 at 19:01
  • Sorry, had a logical failure here :) Of course \secpdf[Short Title]{PDF on Section Page with Short Title}{Example.pdf} is used for the first page, then I add \headerspdf[pages=2-X]{Example.pdf} for all remaining pages! Thanks a lot :)
    – Jens
    Commented May 9, 2014 at 19:27
  • 1
    @Jens Yes. The question I linked to has more explanation but it is for chapters rather than sections and has some other complications. Probably you want the scaling factor to be a little different on pages with a section title so it is easiest to have two commands so that you can adjust the options separately for pages following a section heading and for pages with just headers.
    – cfr
    Commented May 10, 2014 at 2:07
  • A while later, I am using KOMA-script and get an error about using fancy-package here. Any suggestion for this?
    – Jens
    Commented Jan 2, 2019 at 14:54
  • @Jens This answer does also work without fancyhdr. Just remove every \thispagestyle{fancy} and replace \pagestyle{fancy}, e.g., by \pagestyle{headings}. Commented Jan 23, 2019 at 9:44

Alternatively, I add the PDF as follows:

\includepdf[pages=-,offset=75 -75]{myfile.pdf}
  • 4
    Set offset=0 0 instead if using whole-page PDF's.
    – Ludwik
    Commented Oct 17, 2018 at 17:15
  • this does not address the 1 issue raised my OP ("first page of my PDF is placed directly below the title of my appendix A")
    – arilwan
    Commented Jul 18, 2023 at 15:09

Just in case someone else stumbles on this looking for an answer. I found that you could just use the \section{appendix} command as part of the pagecommand:

  \includepdf[pages=2,scale=0.9,offset=0mm -75,pagecommand={

For anyone looking for an approach where multiple PDF pages are added to the project appendix under one section with an additional label to reference it. Here is my solution, constructed from the above answers:


see \ref{reference}

\includepdf[pages=1,offset=0 0, pagecommand={\section{OurAppendix}\label{reference}\thispagestyle{plain}}

\includepdf[pages=2-,offset=0 0, pagecommand=\thispagestyle{plain}

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .