When I try to have a section start with a large image, an extra page is added before the start of the section. I tracked down the problem to the hyperref package; when it is not loaded the extra page disappears. The problem happens with either \figure{image}[H] or plain \includegraphics{image}. The problem is not present with smaller images, or when the section starts with text.
I'm facing this issue when trying to add scans of a4-pages as an appendix. A mwe showing the problem is shown below.
\documentclass{article}
\usepackage{mwe}
% \usepackage{hyperref} % uncommenting this causes an extra page to be created.
\begin{document}
\pagenumbering{gobble} % added so page numbers aren't drawn on top of images, doesn't affect the issue.
\section{Image 1}
\includegraphics[scale=0.7]{example-image-a4}
\includegraphics[scale=0.7]{example-image-a4}
\section{Image 2}
% \lipsum % and uncommenting this fixes the problem.
\includegraphics[scale=0.7]{example-image-a4} % issue not present with 'example-image'
\end{document}
pdfpagespackage to include them into your document? – ebosi May 18 '16 at 15:45\enlargethispage{2\baselineskip}or some other reasonable value. granted, it has to be done on a page-by-page basis, but fine tuning is not unknown in this endeavour. – barbara beeton May 18 '16 at 17:03\includegraphics[width=\textwidth]{example-image-a4}(i.e. adapting you image to the text-area), there is no extra blank page inserted. However, you get an error (Package atveryend Info: Empty hookBeforeClearDocument') when you loadhyperref`... – ebosi May 19 '16 at 08:21showframeand a\framearound the graphics helps show that the images are too large for the page. The problem was resolved for me by cropping the images and making them smaller viawidth=0.7\textwidth. Should I post my solution as an answer to the question? – Heihej May 19 '16 at 08:54