Setting Up PDFxStream
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.
.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.
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:
and the PDFxStream jar is in the lib directory, then you should modify the application's classpath to be:
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
\) 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.
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:
- Place the
pdfxstream.licensefile in your application’s current directory, and PDFxStream will load it automatically.
- Set the
pdfxs_license_pathenvironment variable to the full path where the
pdfxstream.licensefile may be found. For example, if you copy the
pdfxstream.licensefile to the
C:\WINDOWSdirectory, this can be done from the command line by issuing this command:
- Set the
pdfxs_license_pathsystem property to the full path where the
pdfxstream.licensefile 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
–Dargument to the JVM, such as
–Dpdfxs_license_path=~/pdfxstream.license. PDFxStream.NET users can set this system property in an application’s
App.configfile, like so:
<appSettings> <add key="ikvm:pdfxs_license_path" value="C:\WINDOWS\pdfxstream.license"/> </appSettings>
- 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.PDFxStream.loadLicense(String)method. That method may be called at any time to load and verify a license file at the specified path.
- Place the
pdfxstream.licensefile 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
ext/resources/. PDFxStream.NET users can specify the classpath in their application’s
App.configfile, like so:
<appSettings> <add key="ikvm:java.class.path" value="c:\resources\"/> </appSettings>
PDFxStream offers a number of configuration options, all of which are
exposed via the
class. Read more about PDFxStream