Thanks for all the answers - I couldn't for the life of me figure out what logic \includepdf
uses to insert blank pages; the trick with including the first page via \includegraphics
solved most (but not all) of those problems; so here are some notes:
First, out of curiosity, I have also tried to use only \includepdf
, but split in two parts:
\includepdf[pages=1]{MYINCLDOC.pdf}
\includepdf[pages=2-last]{MYINCLDOC.pdf}
... unfortunately, this has the same problem as the question in OP.
- Since @WASE's answer, there are now multiple
\newpage
s in the source (pdfpages.sty
). I tried reading the source, but I found it quite difficult; so I tried temporarily setting \newpage
to \relax
only for \includepdf
- and that puts all pages in the document on top of each other; so probably not a good idea to get rid of \newpage
blindly.
- Just
\includegraphics[page=1,scale=0.8]{foo.pdf}
works - but (as @WASE also note) it is aligned at the top-left corner of the page body, which is to say inside the margins; for a full page we'd want the pdf inclusion overlaid over the whole page, margins included.
This page: graphics - How do I add an image in the upper, left-hand corner using TikZ and graphicx - TeX - LaTeX points to several possibilities for positioning on page over the margins; but for me, the best solution for a full page PDF inclusion is to use package tikz
to center it to the page:
\begin{tikzpicture}[remember picture,overlay]
\node at (current page.center) {\includegraphics[page=1]{MYINCLDOC.pdf}};
\end{tikzpicture}
\includepdf[pages=2-last]{MYINCLDOC.pdf}
After this is done, as a bonus, I have also experienced:
- Proper targets of PDF bookmarks (going to the right page when clicked)
- If you use package
pax
, the data seems to be included also for the \includegraphics
standalone first page, so no difference there
- If you have a twoside document -
pdfpages
, with the above split of the first page in \includegraphics
, will now (seemingly) correctly insert the equivalent of \cleardoublepages
between pdfs that are included back to back (so I don't have to insert such a command manually).
Hope this helps someone,
Cheers!