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. Theorientation parameter lets you specify which orientation to use for all pages in the document.
Parameter details
Controls the orientation of pages in the generated PDFAvailable options:
portrait, landscapeUsage
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
landscapefor documents containing wide charts, tables, or diagrams that benefit from horizontal space. -
Photo collections: Use
landscapefor displaying wide-format photographs or panoramic images. -
Standard documents: Use
portraitfor typical text-heavy documents, articles, and reports that read vertically. -
Presentation handouts: Use
landscapefor materials derived from slide presentations to maintain the original aspect ratio.
Example
Portrait mode (default)
Landscape mode
Combining with size
Theorientation parameter works in conjunction with the size parameter. When both are specified, the orientation is applied to the specified page size.