Skip to content
pubscout

flutter_pdf_text

0.9.0, released 2 years ago by fabi.online

Read and extract text from PDF files on iOS and Android.

$ flutter pub add flutter_pdf_text
Source repository

What it does

Provides a PDFDoc API to load PDFs from files, paths, or URLs and retrieve the document's text, page count, and metadata. Supports lazy loading and caching of page text.

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

Use it when

  • You need to display or search PDF content as plain text in a Flutter app
  • You require cross‑platform PDF text extraction without writing native code

Skip it when

  • You need advanced PDF rendering or editing features
  • You target web or desktop platforms

Strengths

  • Uses native PDFKit on iOS and PdfBox on Android for reliable extraction
  • Lazy loading caches page text for performance
  • Supports encrypted PDFs

Weaknesses

  • Only works on mobile (iOS/Android)
  • No rendering capabilities, only text extraction

Setup

Kind
Plugin (native code)
Effort
Low
Code generation
No
Direct dependencies
3
import 'package:flutter_pdf_text/flutter_pdf_text.dart';

Future<void> readPdf(File file) async {
  PDFDoc doc = await PDFDoc.fromFile(file);
  String text = await doc.text;
  print(text);
}

Alternatives

Packages that do the same job and could replace flutter_pdf_text.

Works with

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