PackageTrack
Sign in Get early access

flutter_native_html_to_pdf

A Flutter plugin that uses native WebView (Android WebView / iOS WKWebView) to render HTML and convert it to a high-quality PDF file.

3.1.0 7.0K downloads/mo #3416 most downloaded on pub.dev Pisey-Nguon/flutter_native_html_to_pdf

What this package is like to depend on

Last release 3 months ago

24 May 2026

Ships unpredictably

gaps range from 1 weeks to 2.0 years

Nearly every release is documented

notes for 14 of 15 stable releases

Nothing withdrawn

no release was ever pulled

3 years old

15 releases · first in 2023

14 releases in the last 12 months

see the full history below

Release timeline

15 releases · Nov 2023 to May 2026
2024 2025 2026
Release Pre-release

Releases

latest 15
  1. 3.1.0 24 May 2026
    Release notes

    What's Changed

    • feat: Update iOS and macOS integration for flutter_native_html_to_pdf by @Pisey-Nguon in #48

    Full Changelog: 3.0.2...3.1.0

    Open source →
    Release notes
    • Add iOS Swift Package Manager support by introducing an SPM package at ios/flutter_native_html_to_pdf
    • Move iOS plugin Swift sources from ios/Classes to ios/flutter_native_html_to_pdf/Sources/flutter_native_html_to_pdf
    • Keep CocoaPods support by updating podspec source paths to the new location
    Open source →
  2. 3.0.2 09 Apr 2026
    Release notes

    What's Changed

    • Fix iOS PDF background colors stripped by WebKit print mode by @Copilot in #43
    • feat: Enable clickable hyperlinks in generated PDFs for iOS and updat… by @Pisey-Nguon in #46

    Full Changelog: 3.0.0...3.0.2

    Open source →
    Release notes
    • Fix iOS: hyperlinks in generated PDFs are now clickable and open the URL in the browser
    • Supports all anchor types — plain text links, image links, and links wrapping any HTML element
    Open source →
  3. 3.0.1 04 Apr 2026
    Release notes
    • Update macOS and iOS configurations, remove unused dependencies, and add generated files
    • Fix iOS PDF background color rendering by injecting print-color-adjust CSS
    Open source →
  4. 3.0.0 01 Mar 2026
    Release notes

    What's Changed

    Full Changelog: 2.0.3...3.0.0

    Open source →
    Release notes

    Major Changes

    • Migrated to Native WebView Rendering: The package now uses native platform WebView (Android WebView / iOS WKWebView) for HTML rendering and PDF generation
    • Architecture Change: Reverted from pure Dart implementation (v2.x) back to native code for improved rendering quality and CSS support
    • Removed Dependencies: No longer depends on pdf and html packages
    • Enhanced Platform Support: Better leverages native capabilities for more accurate HTML-to-PDF conversion

    Implementation Details

    • Added native Android implementation using Android WebView
    • Added native iOS implementation using WKWebView
    • Updated HtmlToPdfConverter to use platform channels for native PDF generation
    • Removed custom HTML parser (html_parser.dart) in favor of native WebView rendering

    Tests

    • Updated unit tests to mock native method calls
    • Maintained test coverage for PDF generation functionality

    Migration Notes

    Version 3.0.0 returns to using native platform code, which provides better rendering quality and CSS support compared to the pure Dart implementation in v2.x. The API remains largely the same, but the underlying implementation now requires Android and iOS platforms.


    Open source →
  5. 2.0.3 06 Feb 2026
    Release notes

    What's Changed

    • Fix incorrect percentage value conversion in CSS dimension parsing by @Copilot in #37

    Full Changelog: 2.0.2...2.0.3

    Open source →
    Release notes
    • Fixed incorrect percentage value parsing in _parseDimension method
    • Percentage values (e.g., width: 70%, border-radius: 50%) were being converted to incorrect fixed pixel values
    • Now returns null for percentage values since they require layout context that's not available at parse time
    • Prevents incorrect rendering of elements with percentage-based styling
    Open source →
  6. 2.0.2 05 Feb 2026
    Release notes

    What's Changed

    • Add support for border-radius, width, height, and min-height CSS properties by @Copilot in #35

    Full Changelog: 2.0.1...2.0.2

    Open source →
    Release notes
    • Add support for border-radius, width, height, and min-height CSS properties

    Bug Fix (2.0.2 Patch):

    Open source →
  7. 2.0.1 05 Feb 2026
    Release notes

    What's Changed

    • Fix: Block elements with backgrounds/borders now span full page width in PDFs by @Copilot in #33

    Full Changelog: 2.0.0...2.0.1

    Open source →
    Release notes

    Bug Fixes

    • Fixed PDF rendering width: Block-level elements (<div> and <p>) with background colors or borders now span the full page width in generated PDFs, matching browser behavior
      • Previously, elements with background-color CSS property only wrapped their content width
      • Now containers expand to full available width when background colors or borders are present
      • Fixes issue where yellow highlighted sections and bordered elements appeared narrow in PDFs

    Tests

    • Added comprehensive test coverage for full-width background and border rendering

    Open source →
  8. 2.0.0 14 Jan 2026
    Release notes

    What's Changed

    Full Changelog: 1.1.6...2.0.0

    Open source →
    Release notes

    Major Changes

    • Migrated to Pure Dart: The package no longer uses native code (iOS, Android, etc.) and is now 100% Dart
    • New Main Class: Use HtmlToPdfConverter instead of FlutterNativeHtmlToPdf
    • No Flutter Dependency: Package can now be used in pure Dart applications
    • Cross-platform: Now supports all platforms including macOS and web

    New Features

    • Added PdfPageSize.fromMillimeters() factory for creating page sizes from millimeter values
    • Added PdfPageSize.fromInches() factory for creating page sizes from inch values
    • Added PdfPageSize.landscape and PdfPageSize.portrait getters for orientation conversion
    • Added PdfPageSize.b5 and PdfPageSize.executive predefined page sizes
    • Return types are now non-nullable (File and Uint8List instead of File? and Uint8List?)

    Migration Guide

    // Old (v1.x)
    final plugin = FlutterNativeHtmlToPdf();
    final pdfFile = await plugin.convertHtmlToPdf(...);
    
    // New (v2.x)
    final converter = HtmlToPdfConverter();
    final pdfFile = await converter.convertHtmlToPdf(...);
    

    Deprecated

    • FlutterNativeHtmlToPdf class is deprecated. Use HtmlToPdfConverter instead.

    Open source →
  9. 1.1.6 14 Jan 2026
    Release notes

    What's Changed

    • Add convertHtmlToPdfBytes to return PDF as Uint8List without file I/O by @Copilot in #6
    • Fix iOS color and font rendering in HTML to PDF conversion by @Copilot in #9
    • Add configurable PDF page sizes for iOS and Android by @Copilot in #10
    • Fix iOS 26 crash: Add required WKNavigationDelegate policy methods by @Copilot in #12
    • Fix iOS share dialog error and migrate to share_plus 12.0.1 by @Copilot in #14
    • Fix PDF generation null return by adding early return after failure callback by @Copilot in #18
    • Fix missing error callback in generatePdfFile when root view controller unavailable by @Copilot in #25
    • Refactor iOS code to support scene-based root view controller retriev… by @Pisey-Nguon in #24
    • Enhance PDF sharing functionality with improved metadata and file handling by @Pisey-Nguon in #28

    New Contributors

    • @Copilot made their first contribution in #6
    • @Pisey-Nguon made their first contribution in #24

    Full Changelog: 1.0.0...1.1.6

    Open source →
    Release notes
    • Refactor iOS code to support scene-based root view controller retrieval and update Info.plist for scene configuration
    • Enhance PDF sharing functionality with improved metadata and file handling
    Open source →
  10. 1.1.5 09 Dec 2025
    Release notes
    • Refactor code for improved readability by removing unnecessary blank lines and formatting adjustments across multiple files
    Open source →
  11. 1.1.4 06 Dec 2025
    Release notes
    • Refactor PDF generation code by removing debug print statements and improving file path construction
    Open source →
  12. 1.1.3 06 Dec 2025
    Release notes
    • Fix PDF generation null return by adding early return after failure callback
    Open source →
  13. 1.1.2 20 Nov 2025
    Release notes
    • Fix iOS 26 compatibility: Fixed crash on iOS 26 caused by missing WKNavigationDelegate policy methods
    • Added decidePolicyForNavigationAction and decidePolicyForNavigationResponse delegate methods
    • These methods are now required by WebKit in iOS 26 to properly load HTML
    • Fixed issue sharing file cannot share in example project (Found in iOS 26)
    Open source →
  14. 1.1.1 10 Nov 2025
    Release notes
    • Fix iOS color and font rendering: HTML to PDF conversion on iOS now properly renders CSS colors and custom fonts
    • Changed base URL in iOS from Bundle.main.bundleURL to "https://" to match Android behavior
    • Added PDF context attributes for better color rendering in iOS
    • Configured WKWebView with isOpaque = false and clear background for improved CSS support
    • Updated example app with enhanced HTML demonstrating colors and font styles
    Open source →
  15. 1.0.1 08 Nov 2023

    Nothing published for this version

Every package, every release, already written down.

The archive is open and free. Watching your own project is what we are building next.

Browse the archive