Search packages, repositories and app categories

Package detailsv2.2.0

dart_pdf_reader

Small pure-dart library for parsing PDF files. Supports reading all pdf structures

AndroidiOSWebmacOSWindowsLinux
30-day downloads
18.2K
Likes
31
Pub points
160

Install package

flutter pub add dart_pdf_reader

Package Overview

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

A lightweight, pure-Dart library designed for parsing PDF files without relying on native dependencies. It supports reading all PDF structures, making it ideal for applications that need to extract text, metadata, or analyze PDF content programmatically. Built with cross-platform compatibility in mind, it works seamlessly across Android, iOS, Web, macOS, Windows, and Linux. The library is particularly useful for developers seeking a straightforward way to integrate PDF parsing into Flutter apps while maintaining full Dart-only codebases.

Use cases

  • Extracting text from PDFs
  • Reading PDF metadata
  • Parsing PDF structure for analysis
  • Integrating PDF processing in Flutter apps
  • Building document inspection tools

Key features

  • Pure Dart implementation
  • Supports all PDF structures
  • Cross-platform compatibility
  • No native dependencies
  • Lightweight and efficient
  • Easy integration with Flutter

Suitable for

  • Flutter developers needing PDF parsing
  • Apps requiring offline PDF analysis
  • Projects avoiding platform-specific code
  • Developers focused on pure Dart solutions
  • Tools for document data extraction

Considerations

  • Limited to parsing; no PDF generation
  • May have performance constraints with very large files
  • Does not support advanced PDF features like forms or annotations
  • Best suited for read-only PDF operations
  • Requires careful memory management for large documents

Original README

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

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);

Categories

Dependencies

Dependency list 4 items

Source repository

Projects using this package

No data available yet.