Skip to main content

Setting Up PDFxStream

Requirements

PDFxStream requires one of:

  • Java v1.5, but we strongly recommend v1.7 or higher
  • .NET 4.0 SP2 or higher

Note that when using the image extraction capabilities of PDFxStream (PDFImageStream) on Java, decoding certain images requires using a Java 1.7 runtime or later; previous Java runtimes do not contain certain image data decoding improvements that 1.7 and later provide.

info

.NET Requirements and Setup

Please refer to our page dedicated to PDFxStream.NET if you are planning on using PDFxStream on .NET. There, you'll find details about which DLLs to use from your download bundle, and what (very small) differences exist between the PDFxStream API for Java and the API for .NET.

External Dependencies

PDFxStream does not require any external libraries.

PDFxStream does include a couple of libraries to support various facilities. Each of these included libraries is "shaded" so as to never conflict with different versions of the same libraries you might be using separately in your application.

Classpath Configuration (Java only)

An application's classpath must be changed in order for PDFxStream's classes to be available from the application's code. For example, if an application's current classpath is:

.:lib/:lib/yourapplication.jar:ext/resources/

and the PDFxStream jar is in the lib directory, then you should modify the application's classpath to be:

.:lib/:lib/yourapplication.jar:ext/resources/:lib/pdfxstream.jar

These classpath examples are suitable for a Unix/Linux/BSD system. The appropriate classpath for a Windows system would be the same as above, except using semicolons (;) instead of colons, and using backslashes (\) instead of forward slashes.

Acquiring PDFxStream via Maven

We maintain a public Maven repository containing artifacts of all PDFxStream releases. If your project uses Maven, or another project-management tool that can consume artifacts from Maven repositories (e.g. Ant, Gradle, Leiningen, and so on), you can add the Snowtide repository and the PDFxStream dependency to your project configuration so as to avoid manually configuring classpaths.

Information about the Snowtide Maven repository and the PDFxStream dependency metadata is available on the PDFxStream downloads page.

Licensing

In order to use or evaluate PDFxStream, you must have a PDFxStream license file. (If you do not have a license file yet, just head over to the downloads page and enter your basic contact info into the form there to quickly receive one free for your evaluation purposes.)

Your license file should be named pdfxstream.license. Deploying this file along with PDFxStream will enable the set of features enumerated within the license file that were selected at the time of purchase, or if you are just trying out PDFxStream, your evaluation license file will enable all of the library's features.

Deploying a PDFxStream license file can be accomplished in many ways:

  1. Place the pdfxstream.license file in your application's current directory, and PDFxStream will load it automatically.

  2. Set the pdfxs_license_path environment variable to the full path where the pdfxstream.license file may be found. For example, if you copy the pdfxstream.license file to the C:\WINDOWS directory, this can be done from the command line by issuing this command:

    set pdfxs_license_path="C:\WINDOWS\pdfxstream.license"
  3. Set the pdfxs_license_path system property to the full path where the pdfxstream.license file may be found. In Java, this can be done either by setting the system property before using PDFxStream by calling the java.lang.System.setProperty(String, String) method, or by specifying the full path of the license file's location using a –D argument to the JVM, such as –Dpdfxs_license_path=~/pdfxstream.license. PDFxStream.NET users can set this system property in an application's App.config file, like so:

    <appSettings>
    <add key="ikvm:pdfxs_license_path" value="C:\WINDOWS\pdfxstream.license"/>
    </appSettings>
  4. The location of the license file may also be specified at runtime, rather than at application startup or through configuration. This may be done by calling the com.snowtide.PDF.loadLicense(String) method. That method may be called at any time to load and verify a license file at the specified path.

  5. Place the pdfxstream.license file at a root of the JRE's classpath. For example, if an application's classpath is defined as shown in the second example in the 'Classpath' section above, then the license file should be placed either in lib or ext/resources/. PDFxStream.NET users can specify the classpath in their application's App.config file, like so:

    <appSettings>
    <add key="ikvm:java.class.path" value="c:\resources\"/>
    </appSettings>

Configuration

PDFxStream offers a number of configuration options, all of which are exposed via the com.snowtide.pdf.Configuration class. Read more about PDFxStream configuration here.