save method

Future<Uint8List> save({
  1. bool enableEventLoopBalancing = false,
})

Generates the PDF document as a memory file.

If enableEventLoopBalancing is true, the method yields periodically during processing to keep the event loop responsive. This can help avoid blocking during the processing of large documents.

Returns a Uint8List containing the document data.

Implementation

Future<Uint8List> save({bool enableEventLoopBalancing = false}) async {
  await _postProcess(enableEventLoopBalancing);

  return await document.save(
    enableEventLoopBalancing: enableEventLoopBalancing,
  );
}