Page orientation
Control the orientation of PDF pages by specifying portrait or landscape mode
The orientation
parameter allows you to control the orientation of pages in the generated PDF.
Overview
When generating a PDF, you can choose between portrait (taller than wide) or landscape (wider than tall) orientation. The orientation
parameter lets you specify which orientation to use for all pages in the document.
Parameter details
Controls the orientation of pages in the generated PDF
Available options: portrait
, landscape
Usage
Behavior
portrait
: Creates pages that are taller than they are wide, suitable for typical documents, articles, and reports.landscape
: Creates pages that are wider than they are tall, ideal for content with wide tables, charts, or images.
Use cases
This parameter is particularly useful for:
-
Data visualization: Use
landscape
for documents containing wide charts, tables, or diagrams that benefit from horizontal space. -
Photo collections: Use
landscape
for displaying wide-format photographs or panoramic images. -
Standard documents: Use
portrait
for typical text-heavy documents, articles, and reports that read vertically. -
Presentation handouts: Use
landscape
for materials derived from slide presentations to maintain the original aspect ratio.
Example
Portrait mode (default)
Landscape mode
Combining with size
The orientation
parameter works in conjunction with the size
parameter. When both are specified, the orientation is applied to the specified page size.
In this example, the PDF will be generated with A4 pages in landscape orientation.