Search packages, repositories and app categories

pdf_merger cover
Package detailsv0.0.6

pdf_merger

A new Flutter plugin for merge List of PDF files. It supports both android and IOS. Before call this package make sure you allow permission and file picker see example.

AndroidiOS
30-day downloads
325
Likes
27
Pub points
130

Install package

flutter pub add pdf_merger

Package Overview

Package selection guidance compiled from public package information, community data, and project usage.

pdf_merger is a Flutter plugin that enables merging multiple PDF files into a single document on both Android and iOS platforms. It provides a straightforward API to combine PDFs programmatically, making it ideal for apps requiring document consolidation. Users must grant file permissions and integrate a file picker before using the plugin, as noted in the example. The package is lightweight and designed for seamless integration with existing Flutter projects.

Use cases

  • Merge multiple PDFs from user selection
  • Combine reports or forms into one file
  • Support document processing workflows
  • Create consolidated PDFs for sharing
  • Automate PDF aggregation in apps
  • Enable offline PDF management

Key features

  • Cross-platform support (Android & iOS)
  • Simple merge API
  • Works with file picker integration
  • Lightweight and efficient
  • Supports list of PDF files
  • Easy setup with clear documentation

Suitable for

  • Document management apps
  • Educational tools
  • Business reporting apps
  • Forms and submissions systems
  • PDF processing utilities
  • Mobile apps needing PDF aggregation

Considerations

  • Requires file permission handling
  • Needs external file picker integration
  • Limited to merging, not editing PDFs
  • No built-in preview functionality
  • Depends on correct setup in example code
  • Not suitable for large-scale PDF manipulation

Original README

Original README snapshot from the linked source repository. Visit the repository for the latest content.

pdf_merger

A new Flutter plugin for merge List of PDF files. It supports both android and IOS. Before call this package make sure you allow permission and file picker see example. Also check file_picker and permission handle to implement before calling the plugin.

PDF merger method

Merge Multiple PDF


  //paths is a list of paths, example List<String> allSelectedFilePath. 
  //outputDirPath is output path with filename, exmaple /user/android/download/ABC.pdf
  
 MergeMultiplePDFResponse response  = await PdfMerger.mergeMultiplePDF(paths: filesPath, outputDirPath: outputDirPath);
 
  if(response.status == "success") {
  //response.response for output path  in String
  //response.message for success message  in String
  }
  
  

Create PDF From Multiple Image


  //paths is a list of paths, example List<String> allSelectedFilePath. 
  //outputDirPath is output path with filename, exmaple /user/android/download/ABC.pdf
  //Optional params maxWidth : defalut set to 360, maxHeight : defalut set to 360, needImageCompressor : default set to true.
  
 CreatePDFFromMultipleImageResponse response  = PdfMerger.createPDFFromMultipleImage(paths: filesPath, outputDirPath: outputDirPath);
 
  if(response.status == "success") {
   //response.response for output path in String
  //response.message for success message  in String
  }
  

Create Image From PDF


  //paths selected file path (String). Example user/android.downlaod/MYPDF.pdf
  //outputDirPath is output path with filename, exmaple /user/android/download/ABC.pdf
 //Optional params maxWidth : defalut set to 360, maxHeight : defalut set to 360, createOneImage : default set to true.
 
 CreateImageFromPDFResponse response  = await PdfMerger.createImageFromPDF(path: singleFile, outputDirPath: outputDirPath);
 
  if(response.status == "success") {
   //response.response for output path in List<String>
  //response.message for success message  in String
  }
  

Get File Size


  //paths selected file path (String). Example user/android.downlaod/MYPDF.pdf
  
 SizeFormPathResponse response  = await PdfMerger.sizeFormPath(path: singleFile);
 
  if(response.status == "success") {
   //response.response for size of file
  //response.message for success message  in String
  }
  

Build Info


 BuildInfoResponse response  = await PdfMerger.buildInfo();
 
 Get.snackbar("Info", "App Name : " + response.appName + "\n" +
            "Build Number : " + response.buildDate + "\n" +
            "Build Number with Time : " + response.buildDateWithTime + "\n" +
            "Package Name : " + response.packageName + "\n" +
            "Version Number : " + response.versionNumber + "\n" +
            "Build Number : " + response.buildNumber.toString() );
  

Android & IOS

ios_1

ios_2

android

Usage

See Example. Use with file picker and add permission handler before calling pdf_merger. Make sure to call permission handler for write permission before call pdf_merger.

file_picker

https://pub.dev/packages/file_picker

permission_handler

https://pub.dev/packages/permission_handler

Support

Android & IOS

For Android

Add these lines in your progaurd

//required to prevent errors from the spongycastle libraries
-keep class org.spongycastle.** { *; }
-dontwarn org.spongycastle.**

For IOS

All set

Categories

Dependencies

Dependency list 1 items

Source repository

Projects using this package

No data available yet.