PdfContent class final
A test instrument: it reads the one page of a PDF back into page-space geometry (plan 13, P-2).
It does the following:
- finds the page;
- concatenates and decodes its content streams;
- tokenises them;
- runs the graphics state (
q/Q,cm, colours, widths,gs, the text state); - records every path, with its points carried to page space by the CTM in force when the path was built, and every text run.
It is not a renderer, and it stays strict. An operator that moves
geometry and that it does not model throws UnsupportedError rather
than being passed over silently: Tc Tw Ts TL T* TD ' " d Do BI sh W W*.
Matrices follow the PDF convention (ISO 32000-1, 8.3.4). A point is a row
vector and [a b c d e f] maps (x, y) to (a·x + c·y + e, b·x + d·y + f). M cm sets CTM' = M × CTM.
Constructors
- PdfContent.parse(Uint8List bytes, {required PdfInflate inflate})
-
Reads
bytes, a whole PDF file with exactly one page.factory
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
-
mediaBox
→ List<
double> -
The page's
/MediaBox:[x0, y0, x1, y1].final -
operatorNames
→ List<
String> -
The operator names alone, in order.
no setter
-
operators
→ List<
PdfContentOp> -
Every operator in the content stream, in order, with its operands.
final
-
paths
→ List<
PdfContentPath> -
Every painted path, in order (
n, which paints nothing, included).final - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
textRuns
→ List<
PdfContentText> -
Every
TJandTj, in order.final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited