PdfDocument class
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, bool verbose = false, PdfVersion version = PdfVersion.pdf_1_5})
- This creates a Pdf document
- PdfDocument.load(PdfDocumentParserBase? prev, {DeflateCallback? deflate, bool compress = true, bool verbose = false})
Properties
- catalog ↔ PdfCatalog
-
This is the Catalog object, which is required by each Pdf Document
latefinal
- compress → bool
-
no setter
-
defaultOutlineBorder
↔ PdfObject<
PdfDataType> ? -
This holds a
PdfObject
describing the default border for annotations. It's only used when the document is being written.getter/setter pair - deflate → DeflateCallback?
-
Callback to compress the stream in the pdf file.
Use
deflate: zlib.encode
if using dart:io No compression by defaultno setter - documentID → Uint8List
-
Generates the document ID
no setter
- encryption ↔ PdfEncryption?
-
Object used to encrypt the document
getter/setter pair
-
fonts
→ Set<
PdfFont> -
This holds the current fonts
final
- graphicStates → PdfGraphicStates
-
Graphic states for opacity and transfer modes
no setter
- hasGraphicStates → bool
-
This document has at least one graphic state
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- info ↔ PdfInfo?
-
This is the info object. Although this is an optional object, we
include it.
getter/setter pair
-
objects
→ Set<
PdfObject< PdfDataType> > -
This vector contains each indirect object within the document.
final
- objser → int
-
no setter
- outline → PdfOutline
-
The root outline
no setter
- pageLabels → PdfPageLabels
-
The root page labels
no setter
- pdfNames → PdfNames
-
The anchor names dictionary
no setter
- pdfPageList → PdfPageList
-
This is the Pages object, which is required by each Pdf Document
no setter
- prev → PdfDocumentParserBase?
-
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- settings ↔ PdfSettings
-
PDF generation settings
latefinal
- sign ↔ PdfSignature?
-
Object used to sign the document
getter/setter pair
- verbose → bool
-
Output a PDF document with comments and formatted data
no setter
- version → PdfVersion
-
PDF version to generate
no setter
- versionString → String
-
The PDF specification version
final
Methods
-
genSerial(
) → int - Creates a new serial number
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent 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