officefileapi-devexpress-dot-pdf-dot-pdfwidgetfacade-9dfee993.md
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
public int PageNumber { get; }
Public ReadOnly Property PageNumber As Integer
| Type | Description |
|---|---|
| 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
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
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