Class PdfDisplayList
Canonical implementation of immutable display list.
public sealed class PdfDisplayList : IPdfDisplayList
- Inheritance
-
PdfDisplayList
- Implements
- Inherited Members
Constructors
PdfDisplayList(int, PdfSize, PdfRect, PdfRect, int, IReadOnlyList<PdfDrawCommand>, PdfFeatureSet, IReadOnlyList<PdfFallbackToken>?)
Creates a display list. The engine builds display lists; hosts rarely create one.
public PdfDisplayList(int pageNumber, PdfSize pageSize, PdfRect mediaBox, PdfRect cropBox, int rotationDegrees, IReadOnlyList<PdfDrawCommand> commands, PdfFeatureSet features, IReadOnlyList<PdfFallbackToken>? fallbackTokens = null)
Parameters
pageNumberintThe page number, starting at 1.
pageSizePdfSizeThe page size in points.
mediaBoxPdfRectThe media box.
cropBoxPdfRectThe crop box.
rotationDegreesintThe page's /Rotate value.
commandsIReadOnlyList<PdfDrawCommand>The drawing commands in painting order; null gives an empty list.
featuresPdfFeatureSetThe kinds of content in
commands.fallbackTokensIReadOnlyList<PdfFallbackToken>The regions that need a fallback renderer; null gives none.
Properties
Commands
The drawing commands, in painting order.
public IReadOnlyList<PdfDrawCommand> Commands { get; }
Property Value
CropBox
The crop box in PDF user space (points): the visible area of the page.
public PdfRect CropBox { get; }
Property Value
FallbackTokens
The regions the engine could not express as vector commands, with the reason for each.
public IReadOnlyList<PdfFallbackToken> FallbackTokens { get; }
Property Value
Features
The kinds of content found on the page.
public PdfFeatureSet Features { get; }
Property Value
HasFallback
True when FallbackTokens is not empty.
public bool HasFallback { get; }
Property Value
MediaBox
The media box in PDF user space (points).
public PdfRect MediaBox { get; }
Property Value
PageNumber
The page number, starting at 1.
public int PageNumber { get; }
Property Value
PageSize
The page size in points, before the page's /Rotate is applied.
public PdfSize PageSize { get; }
Property Value
RotationDegrees
The page's /Rotate value: 0, 90, 180 or 270 degrees clockwise.
public int RotationDegrees { get; }
Property Value
Methods
ComputeFallbackAreaRatio()
Fraction of the crop box covered by fallback regions. Overlapping regions are counted once (sampled on a 64×64 grid) so many small tokens over the same object do not inflate the metric.
public double ComputeFallbackAreaRatio()