save method
Generate the PDF document as a memory file
Implementation
Future<Uint8List> save() async {
return pdfCompute(() async {
final os = PdfStream();
if (prev != null) {
os.putBytes(prev!.bytes);
}
await _write(os);
return os.output();
});
}