Showing
1 changed file
with
7 additions
and
0 deletions
@@ -126,3 +126,10 @@ await for (var page in Printing.raster(doc.save(), pages: [0, 1], dpi: 72)) { | @@ -126,3 +126,10 @@ await for (var page in Printing.raster(doc.save(), pages: [0, 1], dpi: 72)) { | ||
126 | print(image); | 126 | print(image); |
127 | } | 127 | } |
128 | ``` | 128 | ``` |
129 | + | ||
130 | +To print an existing Pdf file from a Flutter asset: | ||
131 | + | ||
132 | +```dart | ||
133 | +final pdf = await rootBundle.load('document.pdf'); | ||
134 | +await Printing.layoutPdf(onLayout: (_) => pdf.buffer.asUint8List()); | ||
135 | +``` |
-
Please register or login to post a comment