Download the PHP package machinateur/php-qpdf-ffi without Composer

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

php-qpdf-ffi

A really simple PHP integration for qpdf leveraging its JSON job file functionality with PHP-FFI to C.

The name really says it all.

Requirements

The PHP-FFI extension is supported since PHP version 7.4, so that's why it is the minimum PHP version this library supports and will support indefinitely.

Installation

The path to the C library should be specified by means of the LIB_QPDF_PATH constant. If not defined, a default value of qpdf.so.11.9 will be used.

Where to get the qpdf binaries

Since qpdf is a separate C library, the binaries are not included here (yet). The Apache 2 license allows redistribution.

https://github.com/qpdf/qpdf/blob/11.9/README-what-to-download.md

Advantages

Use the full set of features provided by qpdf JSON job files directly from within PHP, without the need to write any C glue code for a custom PHP extension.

No need for \exec() shenanigans. The PHP-FFI layer handles the direct interaction. This library only integrates one single function, therefor very little can break.

The JSON format can be dynamically generated based on the requirements of your application. As JSON is supported in a wide range of programming languages, the input does not necessarily have to come from PHP.

https://qpdf.readthedocs.io/en/latest/qpdf-job.html#qpdf-job

Usage

Job file format

The format is documented extensively on qpdf's docs:

https://qpdf.readthedocs.io/en/latest/cli.html

Tests

The test-suite is built based on resources from py-pdf/sample-files. The QpdfJobTest.php is implemented in a way that makes adding addition qpdf JSON job files very ease. As of now, there is only one example.json file, taken from the qpdf docs.

All example jobs should use the same output file, that way the cleanup before each test stays simple (unlink()).

License

It's MIT.


All versions of php-qpdf-ffi with dependencies

PHP Build Version
Package Version
Requires php Version >=7.4
ext-ffi Version *
ext-json 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 machinateur/php-qpdf-ffi contains the following files

Loading the files please wait ....