Yes Brian, I reproduced your problem while using newlfm
. Luckily, in your case, as long as you issue a \AtBeginShipout\AtBeginShipoutDiscard
right after the <filename.pdf>
, it fixes the problem.
In the past, I noticed the newlfm
package has serious issues with these extra pages, that unfortunately, even after issuing a \clearpage
simply do not resolve the issue.
So, say for example, and only for demonstration purposes, a pdf file is created by:
\documentclass{article}
\usepackage{kantlipsum}
\begin{document}
\kant[1-5]
\end{document}
Then a total of 2 pages are created. But when you include the above file in your MWE, an unwanted page results, if you don't issue \AtBeginShipout\AtBeginShipoutDiscard
The following is the correct solution. Please note that the option pages=-
, was used, as the pdfpages
manual states, so all the pages that resulted from the aforementioned file, are included in the document.
\documentclass[]{newlfm}
\usepackage{pdfpages}
\begin{document}
\begin{newlfm}
This is a nicely formatted introductory page.
\includepdf[pages=-]{akantsample.pdf}\AtBeginShipout\AtBeginShipoutDiscard
\end{newlfm}
\end{document}
use
\begin{landscape}
\resizebox{!}{0.95\textheight}{\input{erd.tikz.tex}}
\end{landscape}
The image is too big. The reason why it is placed on the following page.
Best Answer
pdfpages
inserts\newpage
before inserting any content, as well as after the content has been inserted. As such, anything set before the issue of the\newpage
would cause a complete page break. The primitive\noindent
here switches to horizontal mode and therefore initiates a paragraph, even though nothing is set. As such, the\newpage
leaves a visible blank page. Remove it to avoid the first blank page.You could also consider using
atbegshi
to process pages before they're shipped out, and perhaps conditionally (\AtBeginShipoutFirst
) discard them using\AtBeginShipoutDiscard
.