Back to Devexpress

PdfPrinterSettings.PageOrientation Property

officefileapi-devexpress-dot-pdf-dot-pdfprintersettings-08180f9c.md

latest5.0 KB
Original Source

PdfPrinterSettings.PageOrientation Property

Specifies the orientation of pages to be printed.

Namespace : DevExpress.Pdf

Assembly : DevExpress.Pdf.v25.2.Drawing.dll

NuGet Package : DevExpress.Pdf.Drawing

Declaration

csharp
public PdfPrintPageOrientation PageOrientation { get; set; }
vb
Public Property PageOrientation As PdfPrintPageOrientation

Property Value

TypeDescription
PdfPrintPageOrientation

A PdfPrintPageOrientation value. The default value is PdfPrintPageOrientation.Auto.

|

Available values:

NameDescription
Auto

The orientation is defined automatically to fit the page content to the specific paper type.

| | Portrait |

Orientation of the document pages is portrait.

| | Landscape |

Orientation of the document pages is landscape.

|

Property Paths

You can access this nested property as listed below:

LibraryObject TypePath to PageOrientation
WinForms ControlsPdfPageSetupDialogShowingEventArgs

.PrinterSettings .PageOrientation

| | WPF Controls | PageSetupDialogShowingEventArgs |

.PrinterSettings .PageOrientation

|

Remarks

Note that some printers may ignore the PageOrientation property. In this case, page orientation can be customized in printer driver properties.

The following code snippets (auto-collected from DevExpress Examples) contain references to the PageOrientation property.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

pdf-document-api-specify-printer-settings/CS/PdfProcessorPrinterOptions/Program.cs#L17

csharp
// Specify the PDF printer settings.
pdfPrinterSettings.PageOrientation = PdfPrintPageOrientation.Portrait;
pdfPrinterSettings.PageNumbers = new int[] { 1, 3, 4, 5 };

pdf-viewer-use-the-pdf-printer-settings-to-print-a-file/CS/PdfPrinterSettingsDemo/Form1.cs#L30

csharp
// Specify the PDF printer settings.
pdfPrinterSettings.PageOrientation = PdfPrintPageOrientation.Auto;
pdfPrinterSettings.PageNumbers = new int[] { 1, 3, 4, 5 };

how-to-use-pdf-printer-settings/CS/SpecifyPrinterSettings/MainWindow.xaml.cs#L26

csharp
// Specify the PDF printer settings.
pdfPrinterSettings.PageOrientation = PdfPrintPageOrientation.Auto;
pdfPrinterSettings.PageNumbers = new int[] { 1, 3, 4, 5 };

pdf-document-api-specify-printer-settings/VB/PdfProcessorPrinterOptions/Program.vb#L14

vb
' Specify the PDF printer settings.
pdfPrinterSettings.PageOrientation = PdfPrintPageOrientation.Portrait
pdfPrinterSettings.PageNumbers = New Integer() {1, 3, 4, 5}

pdf-viewer-use-the-pdf-printer-settings-to-print-a-file/VB/PdfPrinterSettingsDemo/Form1.vb#L29

vb
' Specify the PDF printer settings.
pdfPrinterSettings.PageOrientation = PdfPrintPageOrientation.Auto
pdfPrinterSettings.PageNumbers = New Integer() {1, 3, 4, 5}

See Also

PdfPrinterSettings Class

PdfPrinterSettings Members

DevExpress.Pdf Namespace