11.2.  Installation

The following sections describe installing PDFUnit-XML, PDFUnit-Java and iText. All of these components are needed to run PDFUnit-XML.

Installation of PDFUnit-XML

Download the file pdfunit-xml-VERSION.zip from the project site: http://www.pdfunit.com/en/download/index.html. If you have purchased a license, you get the ZIP file by mail.

Unzip the file in a folder which is refered to in the following text as PROJECT_HOME.

The following table describes the directory structure.

Directory Description
PROJECT_HOME ANT build script: build.xml. Scripts to run the utilities: *.bat. Project file for Eclipse: .project. A starting point for useful links: index.html and readme.txt. And release-notes.txt, license-info_pdfunit-xml.txt.
PROJECT_HOME/lib Place the iText and PDFUnit-Java runtime libraries into this folder. They are necessary to run PDFUnit-XML.
PROJECT_HOME/lib/pdfunit-xml-VERSION/xslt Style sheets that are needed to process PDFUnit-XML
PROJECT_HOME/lib/pdfunit-xml-VERSION/xsd XML schema file to validate the PDFUnit tests
PROJECT_HOME/lib/pdfunit-xml-VERSION/licenses License information for all libraries used by PDFUnit
PROJECT_HOME/test Examples. You should place your own tests here.
PROJECT_HOME/pdf PDF documents for the test examples. You can also store your own test documents here.

The following figure illustrates this structure.

Structure of the Distribution

The file PROJECT_HOME/index.xml contains links to useful files in the project.

The installation comes with the start-script PROJECT_HOME/build.xml. This ANT script can run on Windows and Linux. You can start the script as described in the next chapter. The test results can be reached from the page PROJECT_HOME/index.html.

It is possible to start the project with other scripting languages. Please write a mail to support[at]pdfunit.com if you need help.

Installation of PDFUnit-Java

PDFUnit-XML requires PDFUnit-Java at runtime. It can be downloaded here: PDFUnit-Java. Make sure that the PDFUnit-Java version matches the PDFUnit-XML version. Which versions work together are documented in the file 'readme.txt'.

Unzip the downloaded ZIP file and copy the resulting folder so it is subfolder of PROJECT_HOME/lib. This folder is called PDFUNITJAVA_HOME in the following text.

Installation of iText

You need iText version 5.3.3 or higher. Download it from here (http://sourceforge.net/projects/itext/files/iText/).

Unzip the iText ZIP file and also copy the resulting folder so it is a subfolder of PROJECT_HOME/lib.

Note that iText requires a license for commercial use.

Using PDFUnit without a License Key

You are welcomed to evaluate PDFUnit. In this case, a message box appears showing a simple math calculation you have to solve. If you calculate successfully the test will run, otherwise you have to restart your test and calculate again.

Little Math question during evaluation

Sometimes the message box is covered by other applications. Then the ANT or Maven script is blocked. Minimize all applications to look for the message box.

PDFUnit comes with some utility programs to extract information from PDF documents. These tools do not need a license key.

Ordering a License Key

If you use PDFUnit in a commercial context you need a license. Write a mail to license[at]pdfunit.com and ask for a license. You will receive an answer as soon as possible.

The license fee is calculated individually. A small company should not pay as much as a big company, and someone testing only a few PDF documents, of course, pays less. And if you want to get a free license, give us some reasons. It is not impossible.

Use License Key

If you have ordered a license you will receive a ZIP file and a separate file license-key_pdfunit-java.lic. Copy this file to PDFUNITJAVA_HOME.

Any change to the license file makes it unusable. If this happens contact PDFUnit.com and ask for a new license file.

Verify the Installation

If you have a problem with the configuration start the script verifyInstallation.bat or verifyInstallation.sh. You will get a detailed problem analysis. See chapter 11.5: “Verifying the Configuration”.