

public sealed class Page
using( var pdfoutput = PdfDocument.Load( inputPath ) ) { var totalPages = pdfDoc.Pages.Count; // Gets text-related statistics for the first 10 pages. foreach(var page in pdfDoc.Pages.Take( 10 ) ) { var pageId = page.Id; var pageSize = new Size( page.PageSettings.Width, page.PageSettings.Height ); var wordCount = page.Words.Count(); var imageCount = page.Images.Count(); var hyperlinkCount = page.Hyperlinks.Count(); } }
System.Object
Xceed.PdfLibrary.NET.Page
| Name | Description | |
|---|---|---|
![]() | FormFields | Gets the form fields. |
![]() | Graphics | Gets the graphics. |
![]() | Hyperlinks | Gets the hyperlinks. |
![]() | Id | Gets the identifier. |
![]() | Images | Gets the page's visible images. Excludes images the document marks as not part of the visible page. |
![]() | OrderedText | Useful for when texts are not on the same lines to order them from top left to bottom right. Not useful when using tables or columns of texts. Excludes text the document marks as not part of the visible page. |
![]() | PageSettings | Gets or sets the page settings. |
![]() | Paths | Gets the page's visible path objects. Excludes paths the document marks as not part of the visible page. |
![]() | Rotation | Gets the rotation. |
![]() | Text | Returns the text in the order it is added in the pdf, not always the same as the visual result. Excludes text the document marks as not part of the visible page. |
![]() | Watermarks | Gets the Watermarks resolved on this Page. |
![]() | Words | Only for languages where words are separated by spaces, not for some asian languages. Excludes text the document marks as not part of the visible page. |
| Name | Description | |
|---|---|---|
![]() | AddParagraph | Overloaded. This method evaluates the Margin property first, and the starting point of draw the text will be the Margin + verticalPosition, for Top-Left. About the width of the text, this will be limited by the Margin property bounds. In the case of the Height, no matter what's the value inserted, this will be limited too by the Margin.Bottom bounds, playing with Page.Height property. |
![]() | AddText | Overloaded. Adds text. |
![]() | FindText | Finds occurrences of the given text within the visible text content of the page. |
![]() | GetTextFromArea | Gets the text inside a Rectangle. Excludes text the document marks as not part of the visible page. |
![]() | RemoveText | Overloaded. Removes a text from the editable text content of the page. |
![]() | ReplaceText | Overloaded. Replaces a text from the editable text content of the page with a new text. The new text will use the replacementTextStyle and if not defined, the new text will use the same font as the found text. Please note that if the font from the found text (or the replacementTextStyle font) is a Font from this PDF, it may be an embedded font. In that case, only the required characters already used in the PDF can be used. Any other character trying to be used will throw an exception. |
![]() | ToString | Converts the Page into a string representation. |
![]() | UpdateTextStyle | Overloaded. Update the TextStyle of a text found in the page. Please note that if the newTextStyle contains a Font from this PDF, it may be an embedded font. In that case, only the required characters already used in the PDF can be updated. Any other character trying to be updated will throw an exception. |
.NET: net5.0, net5.0-windows, net6.0, net6.0-macos, net6.0-windows, net7.0, net7.0-macos, net7.0-windows, net8.0, net8.0-browser, net8.0-macos, net8.0-windows, net9.0, net9.0-browser, net9.0-macos, net9.0-windows, net10.0, net10.0-browser, net10.0-macos, net10.0-windows.
.NET Framework: net40, net403, net45, net451, net452, net46, net461, net462, net463, net47, net471, net472, net48, net481.