Skip to content

yakagami/pdf_master

 
 

Repository files navigation

pdf_master

中文版本

pdf_master is a cross-platform PDF document viewer framework built with Flutter, powered by pdfium.

The project directly uses Dart FFI to query pdfium symbols for PDF rendering, editing, and saving, without writing any native code. This allows for quick compilation and execution, with theoretical support for most platforms (currently Android and iOS are fully implemented).

Current Features

  • Progressive rendering
  • Table of contents viewing and navigation
  • Text selection and copying
  • Add and delete annotations (currently supports highlight annotations)
  • Image viewing and extraction
  • Page management (add, rotate, delete, etc.)
  • Convert to images
  • In-document search
  • Dark mode

Here's a short demo video:

98fdbe8466610a83dce0a9f57348d65c.mp4

Planned Features

  • Remove document passwords
  • Hyperlink navigation
  • Support for more annotation types
  • ...

Installation

Add pdf_master to your pubspec.yaml:

pdf_master: 0.0.4

First, initialize the viewer:

await PdfMaster.instance.init()

Then navigate to the PDF viewer page:

Navigator.of(context).push(
  MaterialPageRoute(
    builder: (ctx) => PDFViewerPage(filePath: filePath)
  )
)

Parameters

Parameter Description Required Default
filePath PDF file path Yes -
password Document password No ""
pageMode Page turning mode No false
fullScreen Fullscreen mode No false
enableEdit Enable editing features No true
showTitleBar Show title bar No true
showToolBar Show toolbar No true
features Advanced features configuration No AdvancedFeature

Configuration

Customize the viewer through PdfMaster:

  • Dark mode and color themes
  • Multi-language support
  • Working directory
  • Sharing functionality
  • Image and file saving options

For advanced customization, you can integrate the source code directly and modify it according to your needs.

About

A cross-platform Flutter PDF viewer powered by Pdfium.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C 56.8%
  • Dart 41.5%
  • C++ 0.6%
  • Swift 0.4%
  • Ruby 0.4%
  • Kotlin 0.3%