PdfInterpreter class
Executes page content streams against a PdfDevice.
Coverage: paths, transforms, device color spaces, clipping, text positioning/showing (with metric-accurate advances), form XObjects, image XObjects and inline images (decoding delegated to the device), shadings, patterns, soft masks, Type3 fonts, and annotation appearance streams.
Constructors
- PdfInterpreter({required CosDocument cos, required PdfDevice device, bool scanImagesOnly = false})
Properties
Methods
-
drawAnnotation(
PdfPage page, PdfAnnotation annotation) → void - Draws a single annotation's appearance stream — the one-annotation slice of drawAnnotations, for callers that need an annotation rendered in isolation (e.g. a live drag preview).
-
drawAnnotations(
PdfPage page, {bool skip(PdfAnnotation)?}) → void - Draws the page's annotation appearance streams, normally called after drawPage so they paint over the content (§12.5.5).
-
drawPage(
PdfPage page) → void -
drawPageOperations(
PdfPage page, List< ContentOperation> operations) → void -
Runs an already-parsed page content stream. Parsing (and the underlying
stream decompression) dominates rendering on graphics-rich pages, so a
renderer that interprets a page more than once — e.g. the image-collect
pass and the paint pass in PdfPageRenderer.renderPicture — parses the
content once and feeds the same
operationsto both passes. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
run(
List< ContentOperation> operations, CosDictionary resources) → void -
Runs a parsed content stream against
resources(used by tests). -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Properties
- debugFontCacheLength → int
-
Number of fonts currently held in the shared cache (test hook).
no setter
Static Methods
-
clearFontCache(
) → void - Empties the shared font cache. Tests that assert on load behaviour or measure cold timings call this first; ordinary rendering never needs to.