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.