htmltopdfwidgets
A Dart package that converts HTML and Markdown rich text content into high-quality PDF widgets. Simplify the creation of PDF documents by seamlessly transforming your structured text content into printable, professional PDFs. Perfect for generating reports, invoices, and more!
2.1.1
14K downloads/mo
#2560 most downloaded on pub.dev
alihassan143/htmltopdfwidgets
What this package is like to depend on
Last release 4 months ago
16 Apr 2026
Release timing varies
gaps range from 1 weeks to 7 months
Nearly every release is documented
notes for 30 of 31 stable releases
Nothing withdrawn
no release was ever pulled
3 years old
33 releases · first in 2023
6 releases in the last 12 months
see the full history below
Release timeline
33 releases · Apr 2023 to Apr 2026Releases
latest 33-
2.1.116 Apr 2026Release notes
Open source →- Branding & Documentation:
- Updated package logo with a modern, futuristic design.
- Fixed broken "Buy Me a Coffee" icon on pub.dev by using a more stable button URL.
- Improved README branding and asset link stability for better pub.dev compatibility.
- Branding & Documentation:
-
2.1.016 Apr 2026Release notes
Open source →- Layout-First Rendering Engine: Major architectural refactor for Chrome-like PDF accuracy.
- Calculated Constraints: Every element now undergoes a virtual layout pass to resolve CSS Box Model constraints (padding, border, margin) before widget generation.
- Standardized Unit Conversion: Implemented $1px = 0.75pt$ scaling to ensure PDF layouts precisely match browser/web views.
- Native Flexbox Support: Added
display: flexsupport with mapping topw.Flex. Supportsflex-grow,flex-direction,justify-content, andalign-items. - Enhanced Table Support: Tables now support repeating headers across pages, cell alignment, and native PDF borders/backgrounds.
- Improved Page Spanning: Refined block detection to allow long content (paragraphs, blockquotes, headers) to bridge across pages without "exceeded page height" errors.
- Refactored Codebase: Decoupled parsing (
HtmlParser), layout calculation (LayoutSolver), and PDF construction (PdfBuilder) for better extensibility.
- Layout-First Rendering Engine: Major architectural refactor for Chrome-like PDF accuracy.
-
2.0.121 Jan 2026Release notes
Open source →- Fixes:
- (#63) feat: add .gitignore and remove ignored files by @alihassan143
- (#63) fix: fixed issue of pdf generation when text for table cell is very long by @AbhishekDoshi26
- (#63) fix: fixed pipeline by @AbhishekDoshi26
- (#63) fix: removed whitespace in paragraph starting by @AbhishekDoshi26
- (#63) fix: fixed column header background color by @AbhishekDoshi26
- (#61) feat: Update legacy HTML to widgets and browser PDF builder, generating new test and example PDF outputs by @AbhishekDoshi26.
- Fixes:
-
2.0.020 Dec 2025Release notes
Open source →- New Architecture: Introduced a "Browser Rendering Engine" architecture for more robust HTML to PDF conversion.
- Style Engine: Comprehensive CSS parsing and cascading support.
- Render Tree: Intermediate DOM representation with fully computed styles.
- PDF Builder: Modular PDF widget generation with better layout handling.
- Unified API: Updated
HTMLToPdf.convertto support the new engine viauseNewEngine: true. - Checkbox Enhancements:
- Fixed inline rendering of checkboxes (now flow with text).
- Improved vertical alignment (centered by default, respects
vertical-align).
- Multi-Language Support:
- Added
textDirectionsupport for RTL languages (Arabic, Hebrew). - Added
fontFallbacksupport for Emojis and complex scripts in the new engine.
- Added
- Enhanced Element Support:
- Improved Table rendering with full CSS support (borders, padding, background).
- Better List handling (nested lists, custom bullets).
- Support for
blockquote,pre,code,hr,checkbox, and more.
- Rendering Improvements:
- Fixed inline content rendering (bold, italic, mixed text).
- Fixed list item text visibility.
- Optimized default spacing to match legacy engine.
- Custom Styles: Added full support for
HtmlTagStylein the new engine. - Robustness: Improved error handling for images and fonts.
- Legacy Support: Maintained full backward compatibility with the legacy engine (default).
- New Architecture: Introduced a "Browser Rendering Engine" architecture for more robust HTML to PDF conversion.
-
2.0.0-beta.205 Dec 2025 pre-releaseRelease notes
Open source →- Checkbox Enhancements:
- Fixed inline rendering of checkboxes (now flow with text).
- Improved vertical alignment (centered by default, respects
vertical-align).
- Multi-Language Support:
- Added
textDirectionsupport for RTL languages (Arabic, Hebrew). - Added
fontFallbacksupport for Emojis and complex scripts in the new engine.
- Added
- Robustness:
- Improved error handling for images and fonts.
- Checkbox Enhancements:
-
2.0.0-beta.104 Dec 2025 pre-releaseRelease notes
Open source →- New Architecture: Introduced a "Browser Rendering Engine" architecture for more robust HTML to PDF conversion.
- Style Engine: Comprehensive CSS parsing and cascading support (
lib/src/browser/css_style.dart). - Render Tree: Intermediate DOM representation with fully computed styles (
lib/src/browser/render_node.dart). - PDF Builder: Modular PDF widget generation with better layout handling (
lib/src/browser/pdf_builder.dart).
- Style Engine: Comprehensive CSS parsing and cascading support (
- Unified API: Updated
HTMLToPdf.convertto support the new engine viauseNewEngine: true. - Enhanced Support:
- Improved Table rendering with full CSS support (borders, padding, background).
- Better List handling (nested lists, custom bullets).
- Support for
blockquote,pre,code,hr,checkbox, and more.
- Rendering Improvements:
- Fixed inline content rendering (bold, italic, mixed text).
- Fixed list item text visibility.
- Optimized default spacing to match legacy engine.
- Custom Styles: Added full support for
HtmlTagStylein the new engine. - Legacy Support: Maintained full backward compatibility with the legacy engine (default).
- New Architecture: Introduced a "Browser Rendering Engine" architecture for more robust HTML to PDF conversion.
-
1.1.314 Aug 2025 -
1.1.214 Aug 2025Nothing published for this version
-
1.1.125 Jul 2025 -
1.1.025 May 2025 -
1.0.918 Jan 2025 -
1.0.817 Jan 2025 -
1.0.717 Jan 2025 -
1.0.607 Jan 2025 -
1.0.520 Nov 2024 -
1.0.412 Sep 2024Release notes
Open source → -
1.0.308 Feb 2024Release notes
Open source →- Bump version and add CHANGELOG entry for the twips/points pixel-scale
fix, PUA bullet fallback, and dotted/dashed border fix. - Loosen the docx_creator dependency from an exact pin to ^1.3.0 (flagged
byflutter pub publish --dry-runas too tight for consumers). - Add docx_file_viewer to the Pub.dev publish workflow's package matrix,
now that trusted publishing is configured for it on pub.dev.
- Bump version and add CHANGELOG entry for the twips/points pixel-scale
-
1.0.218 Jan 2024 -
1.0.106 Jan 2024 -
1.0.006 Jan 2024Release notes
Open source →- fix line break
- fix Can't manage to render colors
- text alignment feature added
-
0.0.930 Sep 2023Release notes
Open source →- Bump AGP to 9.3.1 (from 8.11.1) and the example app's Gradle wrapper to
9.6.1 to satisfy AGP 9.3's minimum Gradle requirement. - android/build.gradle now only applies the standalone Kotlin Gradle Plugin
when built-in Kotlin isn't active (older AGP, or no opt-in via the
android.builtInKotlin Gradle property), matching the pattern other
actively-maintained plugins (e.g. file_picker) use so the plugin keeps
building under both older and newer AGP. Verified with a real
flutter build apk --debugagainst the example app. - Loosen the jni_flutter dependency from an exact pin to ^1.0.1.
- Add native_pdf_engine to the Pub.dev publish workflow's package matrix.
Release notes
Open source →- optimiz parse logic
- documentation fixs
- using override dependency for pdf due to underline and italic issues
- Bump AGP to 9.3.1 (from 8.11.1) and the example app's Gradle wrapper to
-
0.0.9+130 Sep 2023Release notes
Open source →- optimiz parse logic
- documentation fixs
- using override dependency for pdf due to underline and italic issues
- update readme
-
0.0.9+219 Dec 2023 -
0.0.819 Jul 2023 -
0.0.8+123 Jul 2023 -
0.0.8+207 Sep 2023 -
0.0.718 Jul 2023 -
0.0.608 Jun 2023 -
0.0.507 Jun 2023 -
0.0.407 Jun 2023 -
0.0.326 May 2023 -
0.0.211 Apr 2023 -
0.0.110 Apr 2023