I'm building an appendix, and there are a lot of PDF-documents. Each document should be its own appendix, that is each should be its own chapter.

The problem is that I want the PDF inserted right after the chapter-heading, but in practice its pushed to the next page.

\usepackage{pdfpages} % in config-file
    \chapter{Appendix name }

That is: I get a page with a chapter-header, and no content, then a new page where the PDF is inserted. I haven't found any resources that explain this.

I looked in the answer given here, but that does not work either. (\includepdf[scale=0.8,pages=1,pagecommand=\chapter{chapname}]{testpdf} ), gives the following result:

Result of command

The other answer in the same question is to do the following (except it wants to do it section not chapter:

\includepdf[pages=1,pagecommand=\chapter{Chapter Heading}]{appendices/backend-README.pdf}

Which gives the same result as above.

  • Please try \includegraphics[options]{appendices/mypdf.pdf} ? The options may be used as: page=2,trim={5cm 3cm 3cm 3cm} – Sunilkumar KS Nov 11 '15 at 12:33
  • @BMWurm Thanks for the tip! I tried the accepted answer there, but the chapter heading falls over the PDF. Updated my question with the result. – Esso Nov 11 '15 at 13:17
  • @SunilkumarKS Thanks for the tip! Those options pulled the document to the edges of the newpage, and trimmed away content. Tried to scale it together with trim, but I have the same problem. – Esso Nov 11 '15 at 13:21
  • Not a duplicate, but going to be tough to solve with pdfpages. Since that just grabs whole pages from the source PDF, how should it deal with content already on the page? Worse still, if you move the top of the included page below the new chapter header, how should it cleanly crop the content that falls off the bottom of the page and prepend it to the page that follows? – Mike Renfro Nov 11 '15 at 17:27
  • 3
    If your appendix pages are full-sized (in other words, filled with content) pages, then there is no way for you to add a proper title to it. Unless... you change the entire page layout or include the PDF pages in a smaller format rather than it's original full-sized format. Is this what you might be after? – Werner Nov 11 '15 at 18:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.