Table of Contents

Class PdfDisplayList

Namespace
PdfEngine.Vector
Assembly
PdfEngine.Abstractions.dll

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

pageNumber int

The page number, starting at 1.

pageSize PdfSize

The page size in points.

mediaBox PdfRect

The media box.

cropBox PdfRect

The crop box.

rotationDegrees int

The page's /Rotate value.

commands IReadOnlyList<PdfDrawCommand>

The drawing commands in painting order; null gives an empty list.

features PdfFeatureSet

The kinds of content in commands.

fallbackTokens IReadOnlyList<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

IReadOnlyList<PdfDrawCommand>

CropBox

The crop box in PDF user space (points): the visible area of the page.

public PdfRect CropBox { get; }

Property Value

PdfRect

FallbackTokens

The regions the engine could not express as vector commands, with the reason for each.

public IReadOnlyList<PdfFallbackToken> FallbackTokens { get; }

Property Value

IReadOnlyList<PdfFallbackToken>

Features

The kinds of content found on the page.

public PdfFeatureSet Features { get; }

Property Value

PdfFeatureSet

HasFallback

True when FallbackTokens is not empty.

public bool HasFallback { get; }

Property Value

bool

MediaBox

The media box in PDF user space (points).

public PdfRect MediaBox { get; }

Property Value

PdfRect

PageNumber

The page number, starting at 1.

public int PageNumber { get; }

Property Value

int

PageSize

The page size in points, before the page's /Rotate is applied.

public PdfSize PageSize { get; }

Property Value

PdfSize

RotationDegrees

The page's /Rotate value: 0, 90, 180 or 270 degrees clockwise.

public int RotationDegrees { get; }

Property Value

int

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()

Returns

double