PdfDocument class Null safety

This class is the base of the Pdf generator. A PdfDocument class is created for a document, and each page, object, annotation, etc is added to the document. Once complete, the document can be written to a Stream, and the Pdf document's internal structures are kept in sync.

Constructors

PdfDocument({PdfPageMode pageMode = PdfPageMode.none, DeflateCallback? deflate, bool compress = true, PdfVersion version = PdfVersion.pdf_1_4})
This creates a Pdf document
PdfDocument.load(PdfDocumentParserBase? prev, {PdfPageMode pageMode = PdfPageMode.none, DeflateCallback? deflate, bool compress = true})

Properties

catalog ↔ PdfCatalog
This is the Catalog object, which is required by each Pdf Document
read / write
defaultOutlineBorder ↔ PdfObject<PdfDataType>?
This holds a PdfObject describing the default border for annotations. It's only used when the document is being written.
read / write
deflate DeflateCallback?
Callback to compress the stream in the pdf file. Use deflate: zlib.encode if using dart:io No compression by default
final
documentID Uint8List
Generates the document ID
read-only
encryption PdfEncryption?
Object used to encrypt the document
read / write
fonts Set<PdfFont>
This holds the current fonts
final
graphicStates PdfGraphicStates
Graphic states for opacity and transfer modes
read-only
hasGraphicStates bool
This document has at least one graphic state
read-only
hashCode int
The hash code for this object. [...]
read-only, inherited
info PdfInfo?
This is the info object. Although this is an optional object, we include it.
@Deprecated('This can safely be removed.'), read / write
objects Set<PdfObject<PdfDataType>>
This vector contains each indirect object within the document.
final
objser int
read-only
outline PdfOutline
The root outline
read-only
pdfNames ↔ PdfNames
The name dictionary
read / write
pdfPageList ↔ PdfPageList
This is the Pages object, which is required by each Pdf Document
read / write
prev PdfDocumentParserBase?
final
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited
sign PdfSignature?
Object used to sign the document
read / write
version PdfVersion
PDF version to generate
final
versionString String
The PDF specification version
final

Methods

genSerial() int
Creates a new serial number
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
page(int page) PdfPage?
This returns a specific page. It's used mainly when using a Serialized template file.
save() Future<Uint8List>
Generate the PDF document as a memory file
toString() String
A string representation of this object. [...]
inherited

Operators

operator ==(Object other) bool
The equality operator. [...]
inherited