- Purpose: runnable examples that showcase Datalogics PDF Java Toolkit features (creation, forms, manipulation, rendering, etc.).
- Build system: Maven via the bundled wrapper (
./mvnw) targeting Java 7 bytecode (pom.xml). - Artifacts: sample jar plus copied runtime dependencies under
target/once./mvnw package/verifycompletes. - External requirement: proprietary Talkeetna/PDFJT artifacts (
com.datalogics.pdf:talkeetnaortalkeetna-lm) must exist in your Maven repo; they are not in Maven Central.
pom.xml: top-level Maven project defining dependencies, plugin stack (checkstyle, PMD, FindBugs, animal-sniffer), and profiles.src/main/java/com/datalogics/pdf/samples/: sample code grouped by category (creation,forms,manipulation,extraction,rendering,printing,images,signature).src/main/resources/com/datalogics/pdf/samples/: bundled input assets (PDFs, images, form data) used by the samples.src/test/java/com/datalogics/pdf/samples/: JUnit 4 test suites per feature area plus integration runners (AllUnitTests,AllIntegrationTests,RunMainMethodsFromJarIntegrationTest).lite/: secondary Maven project that assembles the "Lite" distribution delivered with PDFJT. Uses the same source tree but trims the file set via thegenerate-distributionprofile.fix_throws_javadoc.sh/.sed: helper scripts referenced during releases to normalize Javadoc (kept for distribution builds).
- Standard build:
./mvnw verify(runs unit tests, copies runtime deps totarget/dependency, creates jar) — seeREADME.mdfor CLI usage. - Java version: compiler plugin locks source/target 1.7; ensure
JAVA_HOMEis compatible. - Static analysis: Checkstyle, PMD, FindBugs, and Animal Sniffer are bound to the lifecycle and will fail the build on violations. Their configurations are unpacked from proprietary
com.datalogicsartifacts duringgenerate-resources. - Logging: SLF4J + Log4j 2 (
log4j-slf4j-impl,log4j-core); default config insrc/main/resources/log4j2.xml. - Dependency snapshot (besides PDFJT):
commons-io,commons-csv,maven-artifact, and test-time libraries (junit,jmockit,junit-toolbox,hamcrest,reflections).
- Unit tests:
./mvnw test(Surefire) — excludes*IT.javaand*IntegrationTest.javaby default. - Integration tests:
./mvnw verify -Pintegration-tests(Failsafe) — require access to sample resources and, for signing tests, DER key/cert pairs already bundled undersrc/main/resources/.../signature/. - Running samples manually: after packaging, use
java -cp target/pdf-java-toolkit-samples-<version>.jar com.datalogics.pdf.samples.creation.HelloWorld(documented inREADME.md). - Some tests (
PrintPdfTest, signing) stub external systems with fake classes; no extra setup beyond valid PDFJT license should be needed.
- Proprietary dependencies: if Maven cannot resolve
com.datalogics.pdf:talkeetna*, you need credentials to the private repository or a local copy (often expected at../repofor internal builds). - Licensing: evaluation builds expect the
.l4jlicense file in the project root and.use-pdfjt-lmpresent so thepdfjt-lmprofile activates automatically. - Generated assets: build output lives under
target/(classes,dependency,integration-test-outputs, jars). Clean with./mvnw cleanas needed. - IDE support: Eclipse Neon project settings and
.p2fprofile are already included for convenience.
- Ensure Java 7+ JDK and access to the private PDFJT Maven repo (or preinstalled Talkeetna artifacts).
- Place evaluation license (
*.l4j) in the repo root and touch.use-pdfjt-lmif running the LM edition. - Run
./mvnw verifyfor a full build; add-Pintegration-testswhen you need integration coverage. - Use samples under
com.datalogics.pdf.samples.*as references for new functionality; utility helpers live insrc/main/java/com/datalogics/pdf/samples/util/.