Back to Devexpress

PdfWidgetFacade.PageNumber Property

officefileapi-devexpress-dot-pdf-dot-pdfwidgetfacade-9dfee993.md

latest2.3 KB
Original Source

PdfWidgetFacade.PageNumber Property

Gets the the page number on which the widget is located.

Namespace : DevExpress.Pdf

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

NuGet Package : DevExpress.Pdf.Core

Declaration

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

Property Value

TypeDescription
Int32

The page number.

|

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-replace-form-field-with-image/CS/ReplaceFormFieldWithImage/Program.cs#L25

csharp
PdfRectangle rect = widget.Rectangle;
PdfPage page = processor.Document.Pages[widget.PageNumber - 1];
double x = rect.Left - page.CropBox.Left;

pdf-document-api-replace-form-field-with-image/VB/ReplaceFormFieldWithImage/Program.vb#L23

vb
Dim rect As PdfRectangle = widget.Rectangle
Dim page As PdfPage = processor.Document.Pages(widget.PageNumber - 1)
Dim x As Double = rect.Left - page.CropBox.Left

See Also

PdfWidgetFacade Class

PdfWidgetFacade Members

DevExpress.Pdf Namespace