Sample code for Datalogics PDF Java Toolkit.
Java Shell Batchfile
Switch branches/tags
Nothing to show
Clone or download
datalogics-coreyy Merge pull request #124 from datalogics-kam/dlpjts-129-logging
DLPJTS-129 Use slf4j and log4j for logging.
Latest commit 8d13af1 Oct 10, 2017

Datalogics PDF Java Toolkit Sample repository

This repository contains samples for use with Datalogics PDF Java Toolkit.

Please note that even though the samples are MIT licensed, you still require a license from Datalogics for PDF Java Toolkit in order to run these samples. Please sign up for an evaluation here or contact us to learn more before evaluating Datalogics PDF Java Toolkit.


  • Java SE 1.7

Using with an evaluation version of PDFJT

The evaluation version of PDF Java Toolkit has license management, and a different artifact name: pdfjt-lm. There's also a corresponding talkeetna-lm which similarly depends on pdfjt-lm. Switching to use these versions of PDF Java Toolkit and Talkeetna is provided with Maven profiles.

License file

Evaluation copies will come with a license file, with a name ending in .l4j.

Move the license file to the top-level directory of the samples, so that it is in the current directory when running samples.

To use license-managed PDFJT, create a file called .use-pdfjt-lm in the top directory of this project. This will activate profiles automatically for Maven and Eclipse.

If this project was received as part of an evaluation, then the .use-pdfjt-lm file is already created.

Building and running from the command line

This project includes maven-wrapper, which fully encapsulates the build system required for PDF Java Toolkit. Your system only requires a Java installation to build and run the samples.

  • To build with Maven, run ./mvnw verify in the 'samples' folder (.\mvnw verify on Windows).
    • This will create a target folder with a set of build artifacts, including the pdf-java-toolkit-samples-lite-0.0.1-SNAPSHOT.jar file containing all the samples.
  • To run a sample, specify the JAR file and the fully qualified name of the sample to run. For example, to run the HelloWorld sample:
    • java -cp target/pdf-java-toolkit-samples-lite-0.0.1-SNAPSHOT.jar com.datalogics.pdf.samples.creation.HelloWorld

Tested IDEs

The samples were developed and tested using Neon 4.6.2

Using remote input PDF files with the samples

By default, the samples run with pre-packaged input PDF files that are treated as resources of the samples. However, you can use your own input PDF files including those that are stored remotely on a shared network with the samples. As long as the shared network where the PDF files reside is mounted on your local machine it's treated a part of your local file system.

For more information on working with files in java please see file path java tutorial.

Talkeetna 5 support

Support for Talkeetna 5 has been dropped from the develop branch. For legacy Talkeetna 5 support, see the develop-talkeetna-5 branch.