Download the PHP package ngekoding/pdf-merger without Composer

On this page you can find all versions of the php package ngekoding/pdf-merger. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package pdf-merger

pdf-merger

Merge multiple PDF files into a single PDF using Ghostscript.

This library uses the Ghostscript CLI to efficiently merge PDF files on Linux or any environment where Ghostscript is installed.

Why this library?

There are many PDF merger libraries out there, but most rely on FPDI, which has limitations in its free version—especially when dealing with certain types of PDFs.

We created pdf-merger as a simple alternative that uses Ghostscript instead, offering a reliable and unrestricted solution for merging PDFs without those limitations.

Requirements

Installation

Usage

Simple usage

Adding files one by one

Setting custom output folder and filename

By default, the merged PDF will be saved in your system's temp directory with a timestamped filename.

You can customize the output folder and/or filename:

Setting output file directly

Instead of setting output folder and filename separately, you can set the full output file path directly:

Setting Ghostscript executable path

If gs is not in your system PATH or you want to use a custom Ghostscript binary:

Setting compression level

You can choose one of the predefined Ghostscript compression levels using the setCompressionLevel() method. The library provides constants for convenience:

Note: Using CompressionLevel::NONE will skip the -dPDFSETTINGS parameter entirely, resulting in output that is as close as possible to the original quality.

For more technical details, you can refer to the Ghostscript documentation.

Setting process timeout

By default, the Ghostscript process timeout is 60 seconds. You can change it (in seconds) or disable by passing null:

Resetting the merger instance

You can reset the internal state (input files, output settings, compression, etc.) to start fresh:

Notes

License

This project is open-sourced under the MIT license.


All versions of pdf-merger with dependencies

PHP Build Version
Package Version
Requires symfony/process Version *
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package ngekoding/pdf-merger contains the following files

Loading the files please wait ....