The pdflscape package
Provides the landscape environment: its content is set on landscape pages, and a PDF viewer shows these pages turned.
Loading the package
\usepackage{pdflscape}landscape starts a new page, sets everything inside it turned by 90° and returns to portrait pages afterwards. Inside the environment the text is as wide as a portrait page is high, so \linewidth has the value of the portrait \textheight.
The environment comes from the package lscape, which pdflscape loads. pdflscape adds one entry to each of these pages in the PDF, so a viewer displays them upright in landscape. On paper there is no difference.
The environment can hold several pages of text, tables, figures and a longtable.
Main commands
\begin{landscape} ... \end{landscape} | Sets the content on one or more landscape pages. |
\linewidth | Inside the environment: the width of the turned text area, for example for \includegraphics[width=\linewidth]. |
\usepackage{lscape} | The same environment without the rotation in the viewer. |
Complete example
\documentclass{article}
\usepackage{pdflscape}
\begin{document}
This page is a portrait page.
\begin{landscape}
\section*{Quarterly figures}
\begin{tabular}{lrrrrrrrr}
\hline
Year & Q1 & Q2 & Q3 & Q4 & Q1 & Q2 & Q3 & Q4 \\ \hline
2025 & 12 & 15 & 11 & 18 & 21 & 19 & 20 & 23 \\
2026 & 14 & 13 & 16 & 20 & 22 & 25 & 24 & 27 \\ \hline
\end{tabular}
\end{landscape}
This page is a portrait page again.
\end{document}Compiled with pdfLaTeX from TeX Live 2023.
Pitfalls
- Only the body of the page is turned. Header, footer and page number stay at the short edges, where they are on a portrait page.
- The environment always starts and ends with a page break. For a single float on a turned page without a break in the text, use
sidewaystablefromrotating. - To set the whole document in landscape, use the
landscapeoption of the document class or ofgeometryinstead.
Related pages
- How-to Rotate a single page to landscape in LaTeX
- How-to Rotate a table in LaTeX
- How-to Set paper size and orientation in LaTeX
- Package
rotating - Package
longtable