Search packages, repositories and app categories

Package detailsv2.12.1

pdfrx

pdfrx is a rich and fast PDF viewer and manipulation plugin built on the top of PDFium. Supports viewing, editing, combining PDFs on Android, iOS, Windows, macOS, Linux, and Web.

AndroidiOSWebmacOSWindowsLinux
30-day downloads
686K
Likes
357
Pub points
160

Install package

flutter pub add pdfrx

Package Overview

Package selection guidance compiled from public package information, community data, and project usage.

pdfrx is a high-performance PDF viewer and manipulation plugin for Flutter, leveraging PDFium for fast rendering and processing across multiple platforms. It enables users to view, edit, and combine PDF documents seamlessly on Android, iOS, Web, macOS, Windows, and Linux. Designed for developers seeking robust PDF functionality with minimal setup, pdfrx offers a native-like experience with support for annotations, text selection, and page navigation. Its cross-platform compatibility makes it ideal for applications requiring reliable PDF handling without platform-specific code.

Use cases

  • Viewing PDFs in mobile and desktop apps
  • Combining multiple PDF files
  • Editing PDF content interactively
  • Integrating PDFs into web applications
  • Creating document management tools
  • Enabling annotation features in apps

Key features

  • Built on PDFium for speed and reliability
  • Cross-platform support (Android, iOS, Web, macOS, Windows, Linux)
  • Support for PDF editing and merging
  • Native performance with Flutter integration
  • Text selection and search capabilities
  • Annotation and markup tools

Suitable for

  • Developers building document-heavy apps
  • Educational or enterprise software requiring PDF handling
  • Apps needing multi-platform PDF support
  • Teams wanting a lightweight PDF solution
  • Projects requiring fast PDF rendering

Considerations

  • Requires native dependencies for some platforms
  • Limited customization of PDF rendering UI
  • May increase app size due to PDFium inclusion
  • Advanced PDF features may require additional configuration
  • Web support depends on browser compatibility
  • Performance varies with large or complex PDFs

Original README

Original README snapshot from the linked source repository. Visit the repository for the latest content.

pdfrx

This repository contains multiple Dart/Flutter packages for PDF rendering, viewing, and manipulation:

Requirements

  • Dart packages require Dart 3.13 or later.
  • Flutter packages require Flutter 3.47 or later.
  • Apple platform integrations target iOS 15 or later and macOS 12 or later.

Packages

pdfrx_engine

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

View repo | API reference

pdfrx

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

View repo | API reference

pdfrx_coregraphics

⚠️ EXPERIMENTAL - CoreGraphics-backed renderer for pdfrx on iOS/macOS.

  • 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

View repo | API reference

pdfium_dart

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
  • Provides PDFium as a Dart native asset, downloaded and bundled at build time
  • Includes getPdfium() for resolving PDFium from a custom module path, Flutter-packaged library, or bundled native asset
  • Coordinates with pdfium_flutter so iOS/macOS Flutter apps use the PDFium XCFramework instead of bundling a duplicate dylib
  • Used as a foundation by higher-level packages

View repo | API reference

pdfium_flutter

Flutter FFI plugin for PDFium integration on native Flutter platforms.

  • Supports Android, iOS, Windows, macOS, and Linux
  • Provides the platform packaging needed to deploy PDFium in Flutter apps
  • Uses Dart native assets for Android, Linux, and Windows
  • Uses the iOS/macOS PDFium XCFramework through CocoaPods or Swift Package Manager
  • Includes low-level PDFium FFI bindings

View repo | API reference

When to Use Which Package

  • 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_flutter if you're building Flutter apps or plugins that need direct PDFium access on native platforms
  • Use pdfium_dart if you need low-level PDFium FFI bindings for pure Dart projects

Getting Started

For Flutter Applications

Add pdfrx to your pubspec.yaml:

dependencies:
  pdfrx: ^2.6.5
For Pure Dart Applications

Add pdfrx_engine to your pubspec.yaml:

dependencies:
  pdfrx_engine: ^0.6.1

Documentation

Comprehensive documentation is available in the doc/ directory, including:

  • Getting started guides
  • Feature tutorials
  • Platform-specific configurations
  • Code examples

Development

This is a monorepo managed with pub workspaces. Just do dart pub get on some directory inside the repo to obtain all the dependencies.

Example Applications

PDF Viewer

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 run
PDF Combine

The 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 run

Contributing

Contributions are welcome! Please read the individual package READMEs for specific development guidelines.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Categories

Dependencies

Dependency list 13 items

Source repository

Projects using this package