PdfReadPage
OfficeIMO.Pdf
Represents a single page parsed from the PDF. Provides access to plain text and basic text spans based on content stream operators.
Inheritance
- object
- PdfReadPage
Remarks
Native page coordinates use default user-space units: one unit is /UserUnit physical points (1/72 inch each), defaulting to 1. Local text/font and matrix values retain their native coordinate spaces. Explicit visual projections use their documented coordinates.
Usage
Explore 3 API references to this type
This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.
Returned or exposed by 3
- Method PdfDocumentPages.GetEnumerator
- Property PdfDocumentPages.Item
- Property PdfUnderstandingPageContext.Page
Methods
public string ExtractText() #Extracts plain text from this page without column reordering.
Returns
stringpublic IReadOnlyList<PdfAnnotation> GetAnnotations() #Reads generic annotation metadata from this page.
Returns
IReadOnlyList<PdfAnnotation>public PdfPageGeometry GetGeometry() #Reads page boundary boxes and page-level presentation metadata.
Returns
PdfPageGeometrypublic IReadOnlyList<PdfImagePlacement> GetImagePlacements() #Extracts image XObject placement invocations from this page.
Returns
IReadOnlyList<PdfImagePlacement>public IReadOnlyList<PdfExtractedImage> GetImages() #Extracts image XObjects referenced by this page.
Returns
IReadOnlyList<PdfExtractedImage>public IReadOnlyList<PdfLinkAnnotation> GetLinkAnnotations() #Reads simple URI, named-destination, direct-destination, named-action, and remote GoTo link annotations from this page.
Returns
IReadOnlyList<PdfLinkAnnotation>public IReadOnlyList<PdfPageAction> GetPageActions() #Reads page-level additional action metadata from this page dictionary.
Returns
IReadOnlyList<PdfPageAction>public ValueTuple<double, double> GetPageSize() #Attempts to read page size from CropBox (or MediaBox) and returns width/height in points. Falls back to 612x792 (US Letter) when not present or malformed.
Returns
ValueTuple<double, double>public int GetRotationDegrees() #Gets inherited page rotation in degrees normalized to 0, 90, 180, or 270.
Returns
intpublic IReadOnlyList<PdfTextSpan> GetTextSpans() #Gets text spans (text with position and font info) from this page.
Returns
IReadOnlyList<PdfTextSpan>public OfficeDrawing ToDrawing() #Projects supported page drawing operators, text spans, and image placements into a dependency-free drawing scene.
Returns
OfficeDrawingpublic OfficeDrawing ToDrawing(OfficeFontFaceCollection fonts, IOfficeTextShapingProvider? textShapingProvider = null, string? textShapingLanguage = null, CancellationToken cancellationToken = default) #Projects supported page content using the supplied fonts and shaping profile before checking glyph visibility.
Parameters
- fonts OfficeIMO.Drawing.OfficeFontFaceCollection
- Fonts to add after embedded fonts, replacing faces with matching family and style.
- textShapingProvider OfficeIMO.Drawing.IOfficeTextShapingProvider? = null
- Optional provider used for glyph shaping and visibility measurements.
- textShapingLanguage string? = null
- Optional language passed to the shaping provider.
- cancellationToken System.Threading.CancellationToken = default
- Token used to cancel page projection.
Returns
OfficeDrawing A drawing scene with the supplied profile applied to the page and nested drawings.