Skip to content
pubscout

pdf_text

0.5.0, released 6 years ago by aluc.dev

Read text content and metadata from PDF documents on iOS and Android.

$ flutter pub add pdf_text
Source repository

What it does

Allows Flutter apps to read text contents from PDF documents using files, paths, or URLs. It supports password-encrypted PDFs, extracts document info like authors and creation dates, and handles page-level lazy loading and caching.

AI-written summary of version 0.5.0, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You need to extract text from local or remote PDF files in a Flutter app.
  • You need to read metadata (author, title, creation date) from a PDF.

Skip it when

  • You need to generate or render visual pages of a PDF as images or views.
  • You need to edit or create new PDF documents.

Strengths

  • Supports loading from files, paths, and URLs.
  • Applies lazy loading and caching for page text performance.
  • Supports password-encrypted PDFs.

Weaknesses

  • Only supports iOS and Android.
  • Limited to text extraction and document info retrieval (no rendering or editing).

Setup

Kind
Plugin (native code)
Effort
Low
Code generation
No
Direct dependencies
3

Works out of the box on iOS and Android using native PDFKit and PdfBox-Android respectively.

import 'package:pdf_text/pdf_text.dart';

PDFDoc doc = await PDFDoc.fromPath(path);
String docText = await doc.text;

Alternatives

Packages that do the same job and could replace pdf_text.

Works with

Packages commonly used together with pdf_text: ones it builds on, ones built on it, and its own family.