# 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 '14 at 0:40

## 4 Answers

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 '14 at 11:17
@cryptic0 Not working isn't useful enough. This code works for me. –  Harish Kumar May 19 '14 at 22:28
The problem is related to the size of the figure. Even if it fits on one page, it might still result in a blank page. I scaled down the figure gradually until the blank page went away. FYI. –  cryptic0 May 21 '14 at 21:04

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 '14 at 1:56

A blank page can be caused by the figure (or table, etc) within the landscape environment exceeding the dimensions of the page's textwidth or textheight. In this case, we can manually define the page margins with \newgeometry{} and then revert back to the document default with\restoregeometry. For example:

\documentclass{article}
\usepackage{geometry}
\usepackage{lscape}
\begin{document}

% Set some new page margins:
\newgeometry{a4paper,left=1in,right=1in,top=1in,bottom=1in,nohead}
\begin{landscape}
% figure, etc
\end{landscape}
\restoregeometry % Restore the global document page margins

\end{document}


Or you can do it with \savegeometry{name} and \loadgeometry{name}. See http://texdoc.net/texmf-dist/doc/latex/geometry/geometry.pdf

-
Welcome to TeX.SX! You can have a look at our starter guide to familiarize yourself further with our format. –  Pier Paolo Jan 18 at 21:43
Thanks for your comment @PierPaolo. I have read the article countless times, but for the life of me I don't understand which specific policy you and your upvoter believe I have not followed. Please explain. –  pds Apr 3 at 14:08

Another simple solution is turn 90° the content of a normal float (without [H]) using only normal (portrait) pages:

\documentclass[12pt]{article}
\usepackage{lipsum}
\usepackage{graphicx}
\begin{document}
\lipsum[1-2]
\begin{figure}
\rotatebox{90}{
\begin{minipage}{\textheight}
\includegraphics[width=\linewidth]{example-image-a}
\caption{DVA part of the Use Case.}
\end{minipage}}
\end{figure}
\lipsum[3-7]
\end{document}
`

-