Installation System requirements, installation and loading SetaPDF components

System Requirements

Generally all SetaPDF 2 components will run on any PHP version above 5.2.17 until revision 817. Future releases will require PHP 5.4 as the minimum PHP version.

Due to security reason or missing feature support in outdated PHP versions some features may be limited in specific components already before or in revision 817. In that case please refer to the system requirements section of the specific component.  

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

Following PHP extensions 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.

Installation

Download the package from your personal pickup depot or from the products download area. 

The downloaded package has to be extracted to a folder of your choice.

The components are usally shipped along with several PHP demos which are not needed for usage in a productive environment.

The main interresting files and folders which are needed to get the components running are located in the

/library/SetaPDF/

folder. The PHP process should be able to read files and folders in this path.

With Composer

All SetaPDF components can be installed through Composer 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 components to your project's composer.json as you may know from packages from Packagist.

For example the current version of the version 2 branch of the Core component can be installed by adding following dependency to your config.json:

{
    "require": {
        "setasign/setapdf-core": "2.*"
    }
}

You will find example composer.json snippets in a products download area or in your personal pickup depot.

Each package will provide autoload information so that you can use the autoloader instance from Composer.

Instructions for Evaluation Versions

The PHP files of an evaluation package are encoded with Zend Guard or Ioncube. Both versions require a kind of loader to be installed in your PHP environment.

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

License files are named .htSetaPDF-<COMPONENT-NAME>.icl (for Ioncube) or .htSetaPDF-<COMPONENT-NAME>.zl (for Zend Guard).

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

The license files should be placed into the root folder "library/SetaPDF/".

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.zl', 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)]

The webserver needs to be restarted!

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!

Please use the composer.json snippets from a products download area or your personal pickup depot which points the correct evaluation package.

By installing an evaluation version via Composer you will not have direct access to the demos that are shipped with each package.

Version Information

Version numbers are created by component and are represented by four integer values: 

[major].[minor].[maintenance].[revision]
major
The major version.
minor
The minor version. Is incremented if a component got new featrues.
maintenance
The maintenance version. Is incremented by each release of a minor version.
revision
The revision number of the version control repository.

A component version number is defined in the VERSION constant of each component. E.g.: 

PHP
$coreVersion = SetaPDF_Core::VERSION;

As of revision 997 a version number change in the SetaPDF-Core component will increase the version number of all other components, too. Before this revision the versioning was done individually.