Setting Up PDFTextStream
Requirements
PDFTextStream requires one of:
- Version 1.5 or higher Java Runtime Environment
- Version 2.0 or higher of the .NET or Mono CLR
External Dependencies
PDFTextStream’s core functionality does not require any external libraries.
If PDFTextStream’s Lucene integration features are used, the libraries required by Lucene 1.2 or higher are required.
PDFTextStream includes a variant of the Apache commons-logging library,
which enables it to dynamically recognize which logging framework you are
using in your application (one of log4j, java.util.logging
, or
none — in which case, log data will be directed to stdout
). If
you are using a different (possibly custom, in-house?) logging library, you
can readily integrate PDFTextStream into it. See Logging
for more information on PDFTextStream's logging configuration options.
Classpath (Java only)
An application's classpath must be changed in order for PDFTextStream'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 PDFTextStream jar is in the lib directory, then you should modify the application's classpath to be:
.:lib/:lib/yourapplication.jar:ext/resources/:lib/pdftextstream.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.
Licensing
If you have purchased PDFTextStream, you should have received a license file
named pdftextstream.license
. Deploying this file along with
PDFTextSTream will enable it to be used in multithreaded environments,
thereby maximizing the utilization of your computing resources and
heightening PDF processing performance and throughput.
If you use PDFTextStream without purchasing a license, then you will only be able to use PDFTextStream in single-threaded applications. Specifically, you will not be able to read more than one PDF file at a time; attempts to open more than one PDF file at a time from multiple application threads will result in an error.
Please note that PDFTextStream may not be redistributed under any circumstance, except with an OEM license.
Deploying a PDFTextStream license file can be accomplished in any of four ways:
- Simply place the
pdftextstream.license
file in your application’s current directory, and PDFTextStream will load it automatically. - Set the
pdfts_license_path
environment variable to the full path where thepdftextstream.license
file may be found. For example, if you copy thepdftextstream.license
file to theC:\WINDOWS
directory, this can from the command line by issuing this command:set pdfts_license_path="C:\WINDOWS\pdftextstream.license"
- Set the
pdfts_license_path
system property to the full path where thepdftextstream.license
file may be found. In Java, this can be done either by setting the system property before using PDFTextStream by calling thejava.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–Dpdfts_license_path=~/pdftextstream.license
. PDFTextStream.NET users can set this system property in an application’sApp.config
file, like so:<appSettings> <add key="ikvm:pdfts_license_path" value="C:\WINDOWS\pdftextstream.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.PDFTextStream.loadLicense(String)
method. That method may be called at any time to load and verify a license file at the specified path. - Place the
pdftextstream.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 inlib
orext/resources/
. PDFTextStream.NET users can specify the classpath in their application’sApp.config
file, like so:<appSettings> <add key="ikvm:java.class.path" value="c:\resources\"/> </appSettings>
Configuration
PDFTextStream offers a number of configuration options, all of which are
available in the com.snowtide.pdf.PDFTextStreamConfig
class.
Please see that class’ API documentation for details of the available configuration
options.