FLUTTER ECOSYSTEM

NicolaVerbeeck/dart_pdf_reader

纯 Dart 编写的 PDF 阅读器库

dart_pdf_reader 项目封面
Stars
27
Forks
6
最近推送(UTC)
2026年3月3日
项目状态
未归档
Nicola Verbeeck GitHub avatar
GITHUB User

Nicola Verbeeck ↗

ChimerappsBelgium
语言Dart

此仓库发布的插件

使用的依赖

依赖清单 8 项

原始 README

以下为英文项目原文快照,最新内容请访问 GitHub。

展开 / 收起项目 README

Version codecovOpenSSF Scorecard

Features

'Simple' PDF reader package. Does not do a lot of interpretation of the data that is being read, but it does provide a way to read the data from a PDF file

Getting started

  1. Create RandomAccessStream from either bytes ByteStream or file FileStream
  2. Create PDFParser using the stream from step 1
  3. Read the PDF file using the PDFParser from step 2 await parser.parse()

Example

final stream = ByteStream(File(inputFile).readAsBytesSync());
final doc = await PDFParser(stream).parse();

final catalog = await doc.catalog;
final pages = await catalog.getPages();
final outlines = await catalog.getOutlines();
final firstPage = pages.getPageAtIndex(0);