exportToPdfDocument method

Future<Document> exportToPdfDocument(
  1. String frameId, {
  2. ExportOptions? overrideOptions,
})

Exports the ExportFrame with the given frameId to a pw.Document.

Implementation

Future<pw.Document> exportToPdfDocument(String frameId,
    {ExportOptions? overrideOptions}) async {
  final frame = getFrame(frameId);

  if (overrideOptions != null) {
    ExportDelegate delegate = copyWith(options: overrideOptions);
    return await delegate._exportDocument(
        frame.exportWidget, frame.exportContext);
  }

  return await _exportDocument(frame.exportWidget, frame.exportContext);
}