buildPdf method

Future<Uint8List> buildPdf({
  1. String orient = 'P',
  2. String paper = 'A4',
  3. String fontAsset = 'assets/fonts/NotoSansTC-Regular.ttf',
})

Implementation

Future<Uint8List> buildPdf({
  String orient    = 'P',
  String paper     = 'A4',
  String fontAsset = 'assets/fonts/NotoSansTC-Regular.ttf',
}) async {
  // The Web platform doesn't support convertHtml; uses _webPrint instead
  if (kIsWeb) {
    await _webPrintBody(buildHtml(), paper, orient);
    return Uint8List(0);
  }
  // Non-Web: could hook up the pw package in the future
  return Uint8List(0);
}