I'm trying to include a pdf document into my main LaTeX document (all my publications into my manuscript), but I want to keep the same page numbering throughout. I'm using the pdfpages package as follows,
\RequirePackage{pdfpages}
\includepdf[pages={-}, % all pages
pagecommand={\thispagestyle{fancy}} % continue page numbering
]{file.pdf}
For most files this works great, but for one particular file this happens:
Definitely not what I wanted, so I removed all excess margins by applying
pdfcrop file.pdf file-pdfcrop.pdf
And update the options as follows,
\includepdf[pages={-}, % all pages
width=\textwidth, % full text-width
frame=true, % for debugging
pagecommand={\thispagestyle{fancy}} % continue page numbering
]{file-pdfcrop.pdf}
This works fine but not exactly aesthetically pleasing for some pages. As the pages in file.pdf have been cropped to various sizes.
Is there any way to force \includepdf to be positioned to the top of the page instead of the default centering?
PS This is my first post on tex.stackexchange, so be gentle 😉
Best Answer
I figured I might as well just use pdfcrop to same sized margins and using a bash script to apply it to all of my pdfs
Finally, success!