PdfParserContentResources class
Resources read from a document opened by PdfDocumentParser.
Resolves /Font and /XObject on demand and memoizes the result: a
document with many pages usually reuses the same fonts.
- Implemented types
Constructors
- PdfParserContentResources(PdfDocumentParser parser, PdfDictToken? dict, {PdfContentResources? parent})
- Creates the resources of a page or of a form XObject.
Properties
- dict → PdfDictToken?
-
/Resourcesdictionary; may be null when the page declares none.final - hashCode → int
-
The hash code for this object.
no setterinherited
- parent → PdfContentResources?
-
Inherited resources, consulted when the name is not in dict.
final
- parser → PdfDocumentParser
-
Source document.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
findFont(
String name) → PdfContentFont? -
Font named
name(with the slash,/F1), ornull.override -
findFormXObject(
String name) → PdfContentFormXObject? -
Form XObject named
name(with the slash), ornull.override -
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
Static Methods
-
buildFont(
PdfDocumentParser parser, PdfDictToken fontDict, {String? resourceName}) → PdfContentFont -
Builds a PdfContentFont from the font dictionary
fontDict. -
forPage(
PdfDocumentParser parser, int pageIndex) → PdfParserContentResources? -
Effective resources of page
pageIndex, with inheritance already applied.