[Tex/LaTex] Appendix – Adding PDF


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}



Best Answer

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

Related Question