PHPackages                             erlangparasu/pdfbox-php-wrapper - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. erlangparasu/pdfbox-php-wrapper

ActiveLibrary

erlangparasu/pdfbox-php-wrapper
===============================

4.1.0(8mo ago)075↓100%Apache-2.0PHP

Since Aug 23Pushed 8mo agoCompare

[ Source](https://github.com/erlangparasu/pdfbox-php-wrapper)[ Packagist](https://packagist.org/packages/erlangparasu/pdfbox-php-wrapper)[ RSS](/packages/erlangparasu-pdfbox-php-wrapper/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (12)Versions (4)Used By (0)

PDFBox PHP Wrapper
==================

[](#pdfbox-php-wrapper)

A simple PHP wrapper for [Apache PDFBox](https://pdfbox.apache.org/) that allows you to perform operations on PDF files. This library shells out to the Java-based PDFBox application.

Features
--------

[](#features)

- Merge multiple PDF files into one.
- Supports PDFBox v2 and v3.

Requirements
------------

[](#requirements)

- PHP 7.4 or higher
- Java Runtime Environment (JRE)
- [Composer](https://getcomposer.org/)

Installation
------------

[](#installation)

You can install the package via Composer:

```
composer require erlangparasu/pdfbox-php-wrapper
```

Installation from GitHub
------------------------

[](#installation-from-github)

To install the library from a specific commit on GitHub, you can add the following to your `composer.json` file:

```
"require": {
    "erlangparasu/pdfbox-php-wrapper": "dev-main"
},
"repositories": [
    {
        "type": "vcs",
        "url": "https://github.com/erlangparasu/pdfbox-php-wrapper.git"
    }
],
"minimum-stability": "dev",
"prefer-stable": true
```

Then, run `composer update`.

To use a specific commit, add `#` to the end of the version string. For example:

```
"require": {
    "erlangparasu/pdfbox-php-wrapper": "dev-main#"
}
```

Usage
-----

[](#usage)

This library provides a simple, fluent interface. By default, it uses PDFBox v2.

### Basic Example (Merge PDFs)

[](#basic-example-merge-pdfs)

```
