pdfrx_engine 0.1.0 copy "pdfrx_engine: ^0.1.0" to clipboard
pdfrx_engine: ^0.1.0 copied to clipboard

pdfrx_engine is a PDF rendering API built on top of PDFium, designed to be used with the pdfrx plugin.

pdfrx_engine #

Build Test

pdfrx_engine is a platform-agnostic PDF rendering engine built on top of PDFium. It provides low-level PDF document APIs without any Flutter dependencies, making it suitable for use in pure Dart applications, CLI tools, or server-side processing.

This package is part of the pdfrx monorepo and serves as the foundation for the pdfrx Flutter plugin, which adds UI widgets and Flutter-specific features on top of this engine.

Multi-platform support #

  • Android
  • iOS
  • Windows
  • macOS
  • Linux (even on Raspberry Pi)
  • Web (WASM)

Example Code #

The following fragment illustrates how to use the PDF engine to load and render a PDF file:

import 'package:pdfrx_engine/pdfrx_engine.dart';

void main() async {
  final document = await PdfDocument.openFile('test.pdf');
  final page = document.pages[0];
  final image = await page.render(
    width: page.width * 200 / 72,
    height: page.height * 200 / 72,
  );
  image.dispose();
  document.close();
}

PDF API #

  • Easy to use PDF APIs
  • PDFium bindings
    • For advanced use cases, you can access the raw PDFium bindings via package:pdfrx_engine/src/native/pdfium_bindings.dart
    • Note: Direct use of PDFium bindings is not recommended for most use cases

When to Use pdfrx_engine vs pdfrx #

Use pdfrx_engine when:

  • Building CLI tools or server applications
  • You need PDF rendering without Flutter UI
  • Creating custom PDF processing pipelines
  • Working in pure Dart environments

Use pdfrx when:

  • Building Flutter applications
  • You need ready-to-use PDF viewer widgets
  • You want features like text selection, search, and zoom controls
  • You prefer high-level APIs with Flutter integration
7
likes
0
points
43.5k
downloads

Publisher

verified publisherespresso3389.jp

Weekly Downloads

pdfrx_engine is a PDF rendering API built on top of PDFium, designed to be used with the pdfrx plugin.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

archive, collection, crypto, ffi, http, path, rxdart, synchronized, vector_math, web

More

Packages that depend on pdfrx_engine