pdf_utils 2.2.0 copy "pdf_utils: ^2.2.0" to clipboard
pdf_utils: ^2.2.0 copied to clipboard

A comprehensive Flutter plugin for PDF manipulation, including professional invoice generation, image-to-PDF conversion, and PDF-to-image extraction.

pdf_utils #

A comprehensive, standalone Flutter plugin for professional PDF manipulation and generation.

pub package Dart License: MIT

Pub.dev | Repository | Issues | Documentation


Showcase #

Invoice Demo App Home PDF Extraction

Features #

  • Professional Invoice Generation: Create stunning PDF invoices with customizable models and high-level styling.
  • Standalone Native Processing: Powered by native PDFBox (Android) and PDFKit (iOS) for maximum performance and reliability.
  • PDF Extraction: Efficiently extract high-quality page images and long vertical images.
  • Text & Metadata: Powerful text extraction and metadata retrieval using PDFDoc with support for encrypted documents.
  • Security: Lock and unlock PDF documents with password protection.
  • Merging & Splitting: Merge multiple PDF files or choose specific pages from a document to combine.
  • Optimized Image Conversion: Both standard (pdf package) and highly optimized native image-to-PDF conversion.

Installation #

Add pdf_utils to your pubspec.yaml:

dependencies:
  pdf_utils: ^2.0.0

Quick Start #

1. Generating an Invoice #

final invoice = Invoice(...);
File pdfFile = await PdfInvoiceGenerator.generate(invoice);

2. Merging PDFs #

File merged = await PdfUtils.mergePdfFiles(
  filesPath: ['path1.pdf', 'path2.pdf'],
  outputFileName: 'combined_document',
);

3. Text Extraction #

final doc = await PDFDoc.fromPath('doc.pdf');
String text = await doc.text;
print('Total pages: ${doc.length}');

4. PDF Protection #

File locked = await PdfUtils.protectPdf(
  inputPath: 'doc.pdf',
  password: 'secret_password',
  outputFileName: 'secure_doc',
);

Documentation #

For more detailed guides, check out the doc directory:

Example App #

Check the example folder for a complete demonstration of the plugin's features on real devices.

License #

This project is licensed under the MIT License - see the LICENSE file for details.

1
likes
150
points
19
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

A comprehensive Flutter plugin for PDF manipulation, including professional invoice generation, image-to-PDF conversion, and PDF-to-image extraction.

Repository (GitHub)
View/report issues

License

MIT (license)

Dependencies

flutter, intl, path, path_provider, pdf, pdfx

More

Packages that depend on pdf_utils

Packages that implement pdf_utils