qnox_pdf_text
A Flutter plugin for extracting text from PDF documents on Android (using pdfbox-android) and iOS (using PDFKit).
Supports both local PDFs and online PDFs via a simple API.
β¨ Features
- Extract all text from a PDF
- Extract text from a specific page
- Get total page count
- Works with local file paths and remote URLs (HTTP/HTTPS)
π¦ Installation
Add the dependency to your pubspec.yaml
:
dependencies:
qnox_pdf_text: ^0.1.0
Then run:
flutter pub get
π Usage
import 'package:qnox_pdf_text/qnox_pdf_text.dart';
final pdf = QnoxPdfText();
// From local file
final pages = await pdf.pageCount('/path/to/file.pdf');
final pageText = await pdf.extractPageText('/path/to/file.pdf', 0);
// From online URL
final urlPages = await pdf.pageCountFromUrl('https://example.com/sample.pdf');
final allText = await pdf.extractTextFromUrl('https://example.com/sample.pdf');
π± Platform Notes
-
Android β’ Requires mavenCentral() in Gradle β’ Uses pdfbox-android internally
-
iOS β’ Minimum iOS 13.0 β’ Uses native PDFKit
π License
MIT License. See LICENSE for details.