# Landscape mode causes a blankpage

I'm using this code for showing an image in landscape mode:

\begin{landscape}

\begin{figure}[H]
\centering
\includegraphics[width=\hsize]{./images/SelectDVA.png}
\caption{DVA part of the Use Case \ref{sec:use_case_2}.}
\end{figure}

\end{landscape}


This causes the output to have a blank page immediately after the rotated page containing the image.

It seems that using landscape causes a page break, is it true?

How can I prevent this behaviour?

-
landscape won't leave a blank page but it causes a page break. You can use afterpage to avoid the white space produced thereby. –  Harish Kumar Nov 27 '12 at 15:32
Never ever include a figure in landscape! –  Stephan Lehmke Nov 27 '12 at 15:36
@StephanLehmke Why not? –  Lucas Oct 28 at 0:40

landscape will not produce blank pages but cause a page break where it is introduced. This will result in undesired white space in the previous page. This can be avoided by using the afterpage package:

\documentclass{article}
\usepackage{lipsum}
\usepackage{graphicx}
\usepackage{afterpage}
\usepackage{lscape}
\begin{document}
\lipsum[1-2]
\afterpage{
\begin{landscape}

\begin{figure}[H]
\centering
\includegraphics[width=\hsize]{example-image-a}
\caption{DVA part of the Use Case \ref{sec:use_case_2}.}
\end{figure}

\end{landscape}
}
\lipsum[3-8]

\end{document}


If you use pdflscape instead of lscape package,

-
can you explain me what is the \lipsum command doing?thks in advance –  Matteo Nov 27 '12 at 15:59
@Matteo It's just filler en.wikipedia.org/wiki/Lipsum –  David Carlisle Nov 27 '12 at 16:53
This isn't working for me. I still have a blank page before the landscape figure. The code was used exactly as in the example above, except that I am using package 'pdflscape'. –  cryptic0 May 19 at 11:17
@cryptic0 Not working isn't useful enough. This code works for me. –  Harish Kumar May 19 at 22:28
I am using this code for a landscape figure. The only change I have made is using pdflscape package which actually rotates the page to landscape mode. However, there is still a blank page before every landscape figure. –  cryptic0 May 20 at 1:56

Have you checked this simple solution? I had a big, page-filling table and the landscape environment caused a blank page before the table. I noticed that the option [H] in \begin{table}[H] caused the blank page. If you use \begin{table}[htbp] instead, the annoying blank page is gone. [H] is useful to place the tables exactly where you position the command, but in conjunction with the landscape environment it is unnecessary.

Example:

\usepackage{lscape}

\begin{document}
% some text
\begin{landscape}
\thispagestyle{empty} %if you want to suppress footer and header
\begin{table}[htbp]
...
\end{table}
\end{landscape}
% continue with your text
\end{document}

-
Welcome to TeX.SX! A tip: If you indent lines by 4 spaces or enclose words in backticks `, they'll be marked as code, as can be seen in my edit. You can also highlight the code and click the "code" button (with "{}" on it). –  Adam Liter Jul 2 at 1:56