pdf_utils 2.0.0
pdf_utils: ^2.0.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.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) andPDFKit(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
PDFDocwith 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 (
pdfpackage) 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:
- 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.