Download the PHP package tudorr89/pdfcombiner without Composer

On this page you can find all versions of the php package tudorr89/pdfcombiner. 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 pdfcombiner

PDF Combine

Latest Version License PHP Version

A modern PHP package to combine multiple PDF files with page-level granularity. Built on TCPDF and FPDI for reliable rendering. Supports Laravel auto-discovery (10.x, 11.x, 12.x) and standalone usage.


Requirements

Under the hood the package depends on tecnickcom/tcpdf and setasign/fpdi — both are pulled in automatically.

Installation

Laravel

If you use Laravel ≥ 5.5 the package registers itself via auto-discovery. No manual setup required.

Publish the config (optional):

Standalone (non-Laravel)


Quick Start

Combine two files and save to disk

Combine specific pages only

Stream to browser for download

Get PDF contents as a string

Laravel — Dependency Injection

Laravel — Facade


API Reference

addFile(string $path, array $pages = []): self

Add a PDF file from disk.

addFiles(array $paths): self

Add multiple files at once. Accepts plain paths or [path, pages] tuples.

addRaw(string $content, string $filename = 'document.pdf', array $pages = []): self

Add PDF content from a raw binary string (e.g. from an HTTP response, database BLOB, or upload stream).

save(string $outputPath): bool

Combine all added files and write the result to $outputPath. Returns true on success.

download(string $filename = 'combined.pdf'): void

Send the combined PDF to the browser as a download (sends Content-Disposition: attachment headers + body). Does not call exit — middleware and terminating callbacks still run.

In Laravel, prefer streaming the body yourself so you stay on the full response pipeline:

stream(string $filename = 'combined.pdf'): string

Return the combined PDF as a raw binary string.

blob(): string

Alias for stream().

getPageCount(): int

Return the total number of pages that would be included in the output (honours page-range filters).

getFileCount(): int

Return the number of files currently queued.

reset(): self

Clear all queued files. Preserves orientation / unit / paper size so the same configured instance can be reused.

resetConfig(): self

Restore orientation / unit / paper size to their defaults (P / mm / A4). Does not touch the file queue.


Configuration

Orientation

Unit of measurement

Paper size

Laravel config (config/pdfcombine.php)

Environment variables override the defaults:


Fluent interface

All setter and adder methods return $this, so you can chain calls:


Error handling

The package throws typed exceptions from PdfCombine\Exceptions\PDFCombineException:

Method Exception message
File not found PDF file not found at path: ...
Invalid / unreadable PDF The file at '...' is not a valid PDF or could not be read.
No files added No PDF files have been added to combine.
Save failed Failed to save the combined PDF to: ...
Page out of range Requested page X is out of range. The document has Y pages.

Changelog

See the releases page on GitHub.


License

MIT — see the LICENSE file for details.


All versions of pdfcombiner with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
setasign/fpdi Version ^2.6
tecnickcom/tcpdf Version ^6.7
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 tudorr89/pdfcombiner contains the following files

Loading the files please wait ...