quick_html_pdf 1.0.4
quick_html_pdf: ^1.0.4 copied to clipboard
A fast, high-performance Flutter Web package for converting HTML templates with dynamic data into PDFs using JavaScript interoperability.
Changelog #
1.0.4 #
- Add CLI tool to automatically add required JS scripts to index.html
- Usage:
dart run quick_html_pdf:add_scripts [path/to/index.html] - Automatically detects and skips if scripts already present
- Usage:
1.0.3 #
- Fix JavaScript ArrayBuffer to Dart Uint8List conversion in bytes mode
- jsPDF's
output('arraybuffer')returns a JS ArrayBuffer, not Uint8Array - Properly convert using
JSArrayBuffer.toDart.asUint8List()
- jsPDF's
1.0.2 #
- Add repository metadata
1.0.1 #
- Documentation improvements
1.0.0 #
Initial release of QuickHtmlPdf - a fast HTML to PDF conversion package for Flutter Web.
Features #
-
Hybrid PDF Generation Strategy
PdfOutput.download: Instant PDF via native browser print (~50ms)PdfOutput.bytes: Returns PDF asUint8Listusing html2canvas + jsPDF
-
Template Engine
{{key}}- HTML-escaped interpolation{{nested.path}}- Dot notation for nested objects{{{rawHtml}}}- Unescaped HTML insertion{{#each items}}...{{/each}}- Loop blocks{{@index}},{{@index1}}- Loop index variables
-
PDF Options
- Page formats: A4, Letter, Legal
- Orientations: Portrait, Landscape
- Custom margins
- Custom header and footer HTML
- Configurable scale and image quality
-
Print CSS
- Automatic
@pagerules for correct sizing - Table header repetition across pages
- Page break utilities (
.page-break,.no-break)
- Automatic
-
Large Document Support
- Chunked rendering for 200+ page documents
- Memory-efficient sequential page processing
-
Developer Experience
- Debug mode with timing logs
- Clear error messages with phase information
UnsupportedErroron non-web platforms