Skip to main content

Search OfficeIMO

Enter a topic, API type, or PowerShell command.

Documentation Search all OfficeIMO/
Class

PdfReadPage

OfficeIMO.Pdf

Namespace
OfficeIMO.Pdf
Assembly
OfficeIMO.Pdf
Source revision
be6c300e4ab1 with working tree changes
Modifiers
sealed

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.

Methods

public string ExtractText() #

Extracts plain text from this page without column reordering.

Returns

string
public 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.

public 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

int
public IReadOnlyList<PdfTextSpan> GetTextSpans() #

Gets text spans (text with position and font info) from this page.

Returns

IReadOnlyList<PdfTextSpan>
ToDrawing 2 overloads
public OfficeDrawing ToDrawing() #

Projects supported page drawing operators, text spans, and image placements into a dependency-free drawing scene.

Returns

OfficeDrawing
public 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 required
Fonts to add after embedded fonts, replacing faces with matching family and style.
textShapingProvider OfficeIMO.Drawing.IOfficeTextShapingProvider? = null optional
Optional provider used for glyph shaping and visibility measurements.
textShapingLanguage string? = null optional
Optional language passed to the shaping provider.
cancellationToken System.Threading.CancellationToken = default optional
Token used to cancel page projection.

Returns

OfficeDrawing A drawing scene with the supplied profile applied to the page and nested drawings.

Properties

public int ObjectNumber { get; } #

Underlying object number for the page.