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