officefileapi-devexpress-dot-pdf-dot-pdfquerypagesettingseventargs.md
Gets the page number in a document.
Namespace : DevExpress.Pdf
Assembly : DevExpress.Pdf.v25.2.Drawing.dll
NuGet Package : DevExpress.Pdf.Drawing
public int PageNumber { get; }
Public ReadOnly Property PageNumber As Integer
| Type | Description |
|---|---|
| Int32 |
An integer value, specifying the page number.
|
The page numbering in a PDF document starts with 1 (not 0 ).
The following code snippet (auto-collected from DevExpress Examples) contains a reference to the PageNumber 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-customize-pdf-print-output/CS/CustomizePrintSettings/Program.cs#L35
// Print the second page with the landscape orientation.
if (e.PageNumber == 2) {
e.PageSettings.Landscape = true;
pdf-document-api-customize-pdf-print-output/VB/CustomizePrintSettings/Program.vb#L30
' Print the second page with the landscape orientation.
If e.PageNumber = 2 Then
e.PageSettings.Landscape = True
See Also
PdfQueryPageSettingsEventArgs Class