PdfDocument constructor

PdfDocument({
  1. PdfPageMode pageMode = PdfPageMode.none,
  2. DeflateCallback? deflate,
  3. bool compress = true,
  4. bool verbose = false,
  5. PdfVersion version = PdfVersion.pdf_1_5,
})

This creates a Pdf document

Implementation

PdfDocument({
  PdfPageMode pageMode = PdfPageMode.none,
  DeflateCallback? deflate,
  bool compress = true,
  bool verbose = false,
  PdfVersion version = PdfVersion.pdf_1_5,
})  : prev = null,
      _objser = 1 {
  settings = PdfSettings(
    deflate: compress ? (deflate ?? defaultDeflate) : null,
    verbose: verbose,
    version: version,
    encryptCallback: (input, object) =>
        encryption?.encrypt(input, object) ?? input,
  );
  // create the catalog
  catalog = PdfCatalog(this, PdfPageList(this), pageMode: pageMode);
}