pdf_utils 3.1.0 copy "pdf_utils: ^3.1.0" to clipboard
pdf_utils: ^3.1.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. Apache 2.0 / MIT Compliant.
  • Smart PDF Resizing: Rescale pages to match specific targets (like A4) while maintaining aspect ratio and centering.
  • Page Manipulation: Reorder, delete, rotate, and Insert (images or PDF pages) in a single pass.
  • 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 Analysis: Retrieve detailed security permissions and validity via code.
  • Locking & Unlocking: Protect PDF documents with passwords or remove them entirely.
  • Merging & Splitting: Combine multiple PDFs or divide them by page ranges.
  • Optimized Image Conversion: Both standard and highly optimized native image-to-PDF converters.

Installation #

Add pdf_utils to your pubspec.yaml:

dependencies:
  pdf_utils: ^3.1.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:

  • Invoice Generation
  • PDF Manipulation (Conversion, Merging, Security)
  • Text Extraction & Metadata

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
0
points
19
downloads

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

unknown (license)

Dependencies

flutter, intl, path, path_provider, pdf, pdfx

More

Packages that depend on pdf_utils

Packages that implement pdf_utils