David PHAM-VAN

Update Readme

@@ -74,6 +74,16 @@ Or share the document to other applications: @@ -74,6 +74,16 @@ Or share the document to other applications:
74 await Printing.sharePdf(bytes: pdf.save(), filename: 'my-document.pdf'); 74 await Printing.sharePdf(bytes: pdf.save(), filename: 'my-document.pdf');
75 ``` 75 ```
76 76
  77 +To print an HTML document, simply do:
  78 +
  79 +```dart
  80 +await Printing.layoutPdf(
  81 + onLayout: (PdfPageFormat format) async => await Printing.convertHtml(
  82 + format: format,
  83 + html: '<html><body><p>Hello!</p></body></html>',
  84 + ));
  85 +```
  86 +
77 ## Installing 87 ## Installing
78 88
79 1. Add this to your package's `pubspec.yaml` file: 89 1. Add this to your package's `pubspec.yaml` file:
@@ -21,3 +21,9 @@ dependencies: @@ -21,3 +21,9 @@ dependencies:
21 path: 21 path:
22 image: 22 image:
23 path_provider: 23 path_provider:
  24 +
  25 +dependency_overrides:
  26 + pdf:
  27 + path: ../pdf
  28 + printing:
  29 + path: ../printing