Skip to content
pubscout

pdf_combiner

6.3.0, released 13 days ago by victorcarreras.dev

Merge multiple PDF documents and images into a single file or extract images from PDFs.

WASM-ready
$ flutter pub add pdf_combiner
Source repository

What it does

Allows developers to combine various PDF documents and images from local paths, raw bytes, or remote URLs into a single PDF file. It also supports extracting images from existing PDF documents with customizable scaling and compression settings.

AI-written summary of version 6.3.0, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You need to merge multiple PDF files or images into a single PDF document.
  • You need to extract images from a PDF file on supported platforms.
  • You work with mixed input sources such as local paths, bytes, and remote URLs.

Skip it when

  • You need advanced PDF editing capabilities like form filling, digital signatures, or text annotations.
  • You are targeting platforms not supported by the plugin.

Strengths

  • Supports multiple input source types including paths, bytes, and URLs via sealed classes.
  • Cross-platform support covering Android, iOS, Linux, macOS, Windows, and web.
  • Provides configuration for image compression and scaling when creating or extracting images.

Weaknesses

  • Web platform requires proper CORS configuration on remote servers when using remote URLs.
  • Specific setup such as installing `libheif-dev` is required to use HEIF images on Linux.

Setup

Kind
Plugin (native code)
Effort
Low
Code generation
No
Direct dependencies
4

No additional setup required for directly supported platforms besides handling file permissions or installing `libheif-dev` on Linux if using HEIF images.

final inputs = [
  MergeInput.path("path/to/local_file1.pdf"),
  MergeInput.path("path/to/local_file2.pdf"),
];
try {
  String response = await PdfCombiner.mergeMultiplePDFs(
    inputs: inputs,
    outputPath: "path/to/output.pdf",
  );
} catch (e) {
  print("Error: $e");
}

Alternatives

Packages that do the same job and could replace pdf_combiner.

Works with

Packages commonly used together with pdf_combiner: ones it builds on, ones built on it, and its own family.