This repository contains multiple Dart/Flutter packages for PDF rendering, viewing, and manipulation:
A platform-agnostic PDF rendering and manipulation API built on top of PDFium.
- Pure Dart package (no Flutter dependencies)
- Provides low-level PDF document API for viewing and editing
- Supports page re-arrangement, PDF combining, image import, and document manipulation
- Can be used in CLI applications or non-Flutter Dart projects
- Supports all platforms: Android, iOS, Windows, macOS, Linux
A cross-platform PDF viewer and manipulation plugin for Flutter.
- Flutter plugin with UI widgets
- Built on top of pdfrx_engine
- Provides high-level viewer widgets and overlays
- Includes text selection, search, zoom controls, and more
- Supports PDF editing features like page manipulation, document combining, and image import
- Uses PDFKit/CoreGraphics instead of PDFium on Apple platforms
- Drop-in replacement for teams preferring the system PDF stack
- Maintains full compatibility with pdfrx widget API
- iOS and macOS only
Low-level Dart FFI bindings for the PDFium library.
- Pure Dart package with auto-generated FFI bindings using ffigen
- Provides direct access to PDFium's C API from Dart
- Includes getPdfium() function that downloads PDFium binaries on demand
- Used as a foundation by higher-level packages
Flutter FFI plugin for loading PDFium native libraries.
- Bundles pre-built PDFium binaries for all Flutter platforms (Android, iOS, Windows, macOS, Linux)
- Provides utilities for loading PDFium at runtime
- Re-exports pdfium_dart FFI bindings
- Simplifies PDFium integration in Flutter applications
- Use pdfrx if you're building a Flutter application and need PDF viewing and manipulation capabilities with UI
- Use pdfrx_engine if you need PDF rendering and manipulation without Flutter dependencies (e.g., server-side PDF processing, CLI tools, PDF combining utilities)
- Use pdfrx_coregraphics (experimental) if you want to use CoreGraphics/PDFKit instead of PDFium on iOS/macOS
- Use pdfium_dart if you need low-level PDFium FFI bindings for Dart projects or want on-demand PDFium binary downloads
- Use pdfium_flutter if you're building a Flutter plugin that needs PDFium integration with bundled binaries
Add pdfrx to your pubspec.yaml:
dependencies:
pdfrx: ^2.2.15Add pdfrx_engine to your pubspec.yaml:
dependencies:
pdfrx_engine: ^0.3.0Comprehensive documentation is available in the doc/ directory, including:
- Getting started guides
- Feature tutorials
- Platform-specific configurations
- Code examples
This is a monorepo managed with pub workspaces. Just do dart pub get on some directory inside the repo to obtain all the dependencies.
The example viewer application is located in packages/pdfrx/example/viewer/. It demonstrates the full capabilities of the pdfrx Flutter plugin.
cd packages/pdfrx/example/viewer
flutter runThe packages/pdfrx/example/pdf_combine/ application demonstrates PDF page manipulation and combining features:
- Drag-and-drop interface for page re-arrangement
- Visual thumbnails of PDF pages
- Support for combining multiple PDF documents
- Platform file drag-and-drop support
cd packages/pdfrx/example/pdf_combine
flutter runContributions are welcome! Please read the individual package READMEs for specific development guidelines.
This project is licensed under the MIT License - see the LICENSE file for details.