pdf – When using pdfpages in LaTeX, how to avoid page breaks before the first page ?

pdf – When using pdfpages in LaTeX, how to avoid page breaks before the first page ?

includepdf uses includegraphics internally, so something like

section{Foo}
fbox{includegraphics[page=1,scale=0.8]{foo.pdf}}

would include the page without starting a new one, although it only does one page at a time.

For me the following worked just fine:

includepdf[pages=1,pagecommand=section{Section Heading}]{testpdf}
includepdf[pages=2-,pagecommand={}]{testpdf}

pdf – When using pdfpages in LaTeX, how to avoid page breaks before the first page ?

I tried this solution too, but includepdf keeps the advantage of outputting the file over the margin (the output is centered from the edges of the page).
So I openned pdfpages.sty, and I searched for newpage command. I deleted the first occurance (line 326), just to try, and after saving then compiling again, there were no page break anymore.

Leave a Reply

Your email address will not be published.