Back to Devexpress

PdfQueryPageSettingsEventArgs.PageNumber Property

officefileapi-devexpress-dot-pdf-dot-pdfquerypagesettingseventargs.md

latest2.4 KB
Original Source

PdfQueryPageSettingsEventArgs.PageNumber Property

Gets the page number in a document.

Namespace : DevExpress.Pdf

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

NuGet Package : DevExpress.Pdf.Drawing

Declaration

csharp
public int PageNumber { get; }
vb
Public ReadOnly Property PageNumber As Integer

Property Value

TypeDescription
Int32

An integer value, specifying the page number.

|

Remarks

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

csharp
// 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

vb
' Print the second page with the landscape orientation.
If e.PageNumber = 2 Then
    e.PageSettings.Landscape = True

See Also

PdfQueryPageSettingsEventArgs Class

PdfQueryPageSettingsEventArgs Members

DevExpress.Pdf Namespace