I am a beginner to LaTeX and I have a few problems with the pdfpages
package. I have to include certain pages from another file (compile them into a final report). I use the \includepdf{pages=3-5}{name.pdf}
command but this creates two problems for me:
- The numbers are 3,4,5 which do not match the pages of my report (they should start from 5 onwards). Is there a command to do so?
- I have a section after which I include the pdf pages. This creates a page with solely the section name and the pdf inclusion starts from the next page. I tried using
\includegraphics
but that cuts off some of the content of the pdf. Is there a better way too?
Edit: solution for the page numbers
Ok, I found a solution which is so simple I am stupid for not reading about it first. I just had to add pagecommand={}
in the options for the \includepdf
command. This created a problem of having two page numbers on each page which I solved by removing the page numbers of the included document. The problem of the blank page is still there so if anyone has a solution, I would be grateful.
Edit2: MWE:
\documentclass{article}
\usepackage{enumerate,a4wide,graphicx,pdfpages}
\title{Final Report}
\begin{document}
\section{Workplan}
\includepdf[pages=3-5,pagecommand={}]{Workplan.pdf}
\end{document}
Best Answer
The page numbering problem you have already solved. It remains the first page with the section title. You could use
\includegraphics[page=3]{Workplan.pdf}
, appropriately scaled, after\section
. But because of the section, there is less space on the first page, thus the page probably needs to be scaled down.An alternative is again using
pagecommand
:Depending on the margin settings and the first page of
Workplan.pdf
the section title may collide with stuff of the embedded page.If
Workplan.pdf
is also generated by LaTeX, perhaps including/inputting the TeX source might also be an option.