PdfDocument.load constructor

PdfDocument.load(
  1. PdfDocumentParserBase? prev, {
  2. DeflateCallback? deflate,
  3. bool compress = true,
  4. bool verbose = false,
})

Implementation

PdfDocument.load(
  this.prev, {
  DeflateCallback? deflate,
  bool compress = true,
  bool verbose = false,
}) : _objser = prev!.size {
  settings = PdfSettings(
    deflate: compress ? (deflate ?? defaultDeflate) : null,
    verbose: verbose,
    version: prev!.version,
    encryptCallback: (input, object) =>
        encryption?.encrypt(input, object) ?? input,
  );

  // Import the existing document
  prev!.mergeDocument(this);
}