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.
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.
65Compare - printing_ffi
Flutter plugin for direct printer communication and print job management via native FFI bindings.
30Compare
Works with
Packages commonly used together with pdfium_dart: ones it builds on, ones built on it, and its own family.
- archivepdfium_dart depends on itEncodes and decodes archive and compression formats such as zip, tar, gzip, and zlib.
- cryptopdfium_dart depends on itProvides SHA, MD5, and HMAC hashing functions for Dart.
- hookspdfium_dart depends on itDart API for the JSON-based protocol for package build and link hooks.
- code_assetspdfium_dart depends on itProvides the hook protocol specification for bundling native code with Dart packages.
- ffipdfium_dart depends on itUtilities for working with Foreign Function Interface (FFI) code in Dart.
- native_toolchain_cpdfium_dart depends on itInvoke the native C compiler installed on the host machine.
- pdfrx_engineBuilt on pdfium_dartPure Dart PDF rendering and manipulation API built on top of PDFium.
- pdfium_flutterBuilt on pdfium_dartFlutter FFI plugin that bundles PDFium for native PDF rendering on Android, iOS, Windows, macOS, and Linux.