Class PdfPage
- Namespace
- PDiffy
- Assembly
- PDiffy.dll
A page. Unreadable is set when the PDF library could not load it; its other values are then empty. The boxes are set only when the page declares them (or, for the crop box, inherits one).
public sealed record PdfPage : IEquatable<PdfPage>
- Inheritance
-
PdfPage
- Implements
- Inherited Members
Properties
ArtBox
The area of the page's meaningful content; null when the page doesn't set one.
public PdfBox? ArtBox { get; init; }
Property Value
ArtifactsHoldingTaggedContent
How many artifacts on the page hold tagged content (marked content with an MCID), which PDF/UA doesn't allow.
public int ArtifactsHoldingTaggedContent { get; init; }
Property Value
ArtifactsInTaggedContent
How many artifacts on the page sit inside tagged content, which PDF/UA doesn't allow, since a screen reader can't tell whether to read them.
public int ArtifactsInTaggedContent { get; init; }
Property Value
BleedBox
The area to keep when printing with bleed; null when the page doesn't set one.
public PdfBox? BleedBox { get; init; }
Property Value
CropBox
The area a viewer shows; null when neither the page nor a parent sets one, so all of it shows.
public PdfBox? CropBox { get; init; }
Property Value
DefaultColors
A hash of the page's default color spaces (its /DefaultGray, /DefaultRGB and /DefaultCMYK resources), and of those each form it draws sets for its own content, such as "3f9c0a1b2d4e5f60", or "unreadable". They change how gray, RGB and CMYK colors show, often through a color profile. Null when neither the page nor its forms set any.
public string? DefaultColors { get; init; }
Property Value
Group
The page's transparency group, which changes how overlapping content blends.
public PdfPageGroup? Group { get; init; }
Property Value
HasAnnotations
Whether the page has annotations, such as links or form fields.
public required bool HasAnnotations { get; init; }
Property Value
Height
The media box's height in points, before Rotation turns the page; 0 for an unreadable page.
public required double Height { get; init; }
Property Value
Number
The page number, counted from 1.
public required int Number { get; init; }
Property Value
RepeatedMcids
How many marked-content sequences on the page reuse an MCID from an earlier sequence in the same content stream, as when a form XObject with MCIDs is drawn more than once. PDF/UA allows each MCID only once per content stream, since the parent tree can give it to only one element.
public int RepeatedMcids { get; init; }
Property Value
Rotation
How far a viewer turns the page clockwise, in degrees: 0, 90, 180 or 270.
public required int Rotation { get; init; }
Property Value
Tabs
The tab order of the page's links and form fields: "R" (rows), "C" (columns) or "S" (structure order, which PDF/UA requires on a page with annotations), or another name the PDF writes; null when the page doesn't set one. PdfTabOrders lists the standard ones.
public required string? Tabs { get; init; }
Property Value
TrimBox
The finished page after trimming; null when the page doesn't set one.
public PdfBox? TrimBox { get; init; }
Property Value
Unreadable
Whether the PDF library couldn't load the page.
public bool Unreadable { get; init; }
Property Value
UnreadableHash
For a page that couldn't be loaded, a hash of the entries that decide how it draws, such as its content streams, page boxes and resources, and everything they reach, so a change to the page still shows; null for a page that loaded.
public string? UnreadableHash { get; init; }
Property Value
UserUnit
The size of one unit in points, for pages larger than PDF's usual limit; null when the page doesn't set it, which means 1.
public double? UserUnit { get; init; }
Property Value
Width
The media box's width in points, before Rotation turns the page, so a portrait page turned 90 degrees still has its portrait width; 0 for an unreadable page.
public required double Width { get; init; }