Skip to content
pubscout

pdfium_flutter

0.4.3, released 4 days ago by espresso3389.jp

Flutter FFI plugin that bundles PDFium for native PDF rendering on Android, iOS, Windows, macOS, and Linux.

$ flutter pub add pdfium_flutter
Source repository

What it does

It packages PDFium native binaries and exposes low‑level FFI bindings so Flutter apps can load and render PDFs directly. The plugin also handles platform‑specific asset packaging and XCFramework integration.

AI-written summary of version 0.4.1, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You need direct, low‑level access to PDFium for custom PDF processing or rendering
  • You target native Flutter platforms (mobile, desktop) and require a bundled PDF engine
  • You want automatic native binary handling without managing PDFium yourself

Skip it when

  • You need a high‑level PDF viewer widget or web support
  • You prefer a pure‑Dart solution without native toolchains
  • You are building for the web

Strengths

  • Cross‑platform native PDFium binaries are bundled automatically
  • Supports multi‑engine applications via a process‑wide gate
  • Handles iOS/macOS XCFramework integration via CocoaPods/SwiftPM
  • No separate download step for PDFium binaries

Weaknesses

  • Low‑level API requires manual handling of PDF rendering
  • Requires a C toolchain for native builds
  • No web support

Setup

Kind
Plugin (native code)
Effort
Medium
Code generation
No
Direct dependencies
5

A C toolchain is required to compile the bundled gate library on native platforms. iOS/macOS need CocoaPods or Swift Package Manager for the XCFramework. Ensure Flutter 3.47+ and Dart 3.13+.

import 'package:pdfium_flutter/pdfium_flutter.dart';

final pdfium = pdfiumBindings; // default bindings
final customPdfium = getPdfium(modulePath: '/custom/path/to/pdfium.so');

Alternatives

Packages that do the same job and could replace pdfium_flutter.

  • open_filex

    Plugin to open files via native apps, returning a string result

  • pdf_manipulator

    Cross-platform PDF toolkit for Flutter. Merge, split, render, extract, search, sign, encrypt, convert, build from scratch. Rust engine, off the main thread.

  • file_saver_ffi

    Save any file type to device storage, gallery, or a user‑chosen folder with progress and conflict handling.

  • filepicker_windows

    Windows file and directory picker using native dialog controls

Works with

Packages commonly used together with pdfium_flutter: ones it builds on, ones built on it, and its own family.