Skip to content
pubscout

pdfium_dart

0.4.4, released 3 days ago by espresso3389.jp

Dart FFI bindings for the PDFium library providing low-level C API access.

$ flutter pub add pdfium_dart
Source repository

What it does

Provides low-level Dart FFI bindings for the PDFium library. It automatically downloads and bundles PDFium binaries at build time using Dart native assets and includes a native coordinator to manage library access safely across multiple engines.

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

Use it when

  • You are building a higher-level PDF package that requires low-level PDFium access.
  • You need direct access to PDFium's C API from pure Dart or Flutter.

Skip it when

  • You are building a normal Flutter application and could use a higher-level package like pdfium_flutter instead.
  • You do not need low-level PDF operations.

Strengths

  • Provides direct, low-level access to PDFium's C API.
  • Cross-platform support for Windows, Linux, Android, and macOS.
  • Automatically downloads and bundles PDFium binaries using Dart native assets.

Weaknesses

  • Requires a C compiler for native builds.
  • Direct usage is complex and not recommended for typical app development.

Setup

Kind
FFI (native library)
Effort
Medium
Code generation
No
Direct dependencies
7

Requires a C compiler for native builds (MSVC on Windows, Xcode on Apple platforms, or Clang/GCC on Linux).

import 'package:pdfium_dart/pdfium_dart.dart';

void main() async {
  final pdfium = getPdfium();
}

Alternatives

Packages that do the same job and could replace pdfium_dart.

  • git2dart

    Dart bindings to libgit2 for working with Git repositories via FFI.

  • printing_ffi

    Flutter plugin for direct printer communication and print job management via native FFI bindings.

Works with

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