Installation System requirements and installation of the FPDI PDF-Parser

System Requirements

Generally the FPDI PDF-Parser will run on any PHP version above 5.2.1.

An up to date PHP version (> 5.3) is recommend for best performance and memory results.

Following PHP extension must be enabled in the PHP configuration:

Because PDF parsing and writing is a performance intensive task the components should be used on a machine with a fast CPU. Also the max_execution_time value should be taken into account.

Same for memory usage. Because PDF documents are sometimes built with several thousands of individual objects, the components will need memory for managing these things. Maybe it is needed to touch the memory_limit value as well.

For sure the FPDI Parser requires an installation of FPDI, too. The documentation applies to the latest versions of all involved classes.

Installation

First of all you have to download the package from the project website.  

Don't forget to install FPDI before! 

The FPDI PDF-Parser is a replacement of the PDF parser that is shipped with FPDI by default. Just extract the content of this package to your existing FPDI directory to overwrite the file pdf_parser.php and extract additional files in the filters folder.

With Composer

The FPDI PDF-Parser can be installed through Composer of version 1.1.2 as well. We setup an own composer repository  which has to be added to your config.json first:

{
    "repositories": [
        {
            "type": "composer",
            "url": "https://www.setasign.com/downloads/"
        }
    ]
}

By adding the new repository you can add a dependency on the FPDI PDF-Parser to your project's composer.json file:

{
    "require": {
        "setasign/fpdi_pdf-parser": "1.*"
    }
}

You will also find this information on each download page of the FPDI PDF-Parser

Instructions for Evaluation Versions

An evaluation package is encoded with Zend Guard or Ioncube.
Both versions requires a kind of loader to be installed on your server.

An evaluation version is separated into two parts: The PHP files and a license file.  

License files are named .htFPDI_PDF-Parser.icl or .htFPDI_PDF-Parser.zl

Notice the dot at the beginning of the filename!
Some systems (e.g. MAC) automatically hide such files!

Depending on the version read the following installation instructions:

Ioncube

The needed loaders and install instruction for the Ioncube Loader are available at: http://www.ioncube.com/loaders.php

Place the license file into the same directory of the pdf_parser.php file.

Zend

To run Zend Guard encoded PHP files the Zend Optimizer (PHP 5.2) or the Zend Guard Loader (PHP 5.3) need to be installed on the server. It is available for download at: http://www.zend.com/products/guard/downloads

Following PHP code shall be used to load the license file at runtime:

PHP
zend_loader_install_license([absolute_path_to_the_licensefile], true);

The download package of an evaluation license includes a PHP file (loadLicense.php) that includes the above line, so that you just have to require the file and the license will be loaded automatically.

It is also possible to load a license file via an entry in the php.ini:

zend_optimizer.licence_path = [path_to_the_licensefile(s)]
or
zend_loader.license_path = [path_to_the_licensefile(s)]

With Composer

If you install an evaluation version through Composer the dependency management will automatically install an evaluation license (if a license is available), so that you do not need to touch a license file at any time!

To get the package name you'll need to require just check the download page of the FPDI PDF-Parser after requesting an evaluation version.