veraPDF-library
repository·integration·Indexed 43 days ago
https://github.com/verapdf/verapdf-libraryA specialized Java library for industry-standard PDF/A and PDF/UA validation. It enables developers to programmatically verify PDF compliance, extract features, and handle XMP metadata via the XMPCore Java API. The library provides core logic for archival and accessibility standards validation, including interfaces like ProcessorResult and TaskResult for managing validation outcomes.
What's inside veraPDF
- veraPDF-library is an industry-supported library for PDF/A and PDF/UA validation. It provides the core logic required to validate PDF files against these specific archival and accessibility standards.
Generate PDF Feature Reports
integrationveraPDF can generate PDF Feature Reports, which provide detailed information about the features present in a PDF file. This capability has been available since the early alpha/beta stages (v0.2/v0.4) and is used alongside conformance checking.Understand veraPDF dual-licensing and header templates
integrationAll veraPDF software is dual-licensed under GPLv3+ and MPLv2+.
The project uses the Maven license plugin to manage source code headers. The templates used for these headers are located in the
license/templatesub-folder of the repository:- GPL version template:
license/template/GPL-3.txt - MPL version template:
license/template/MPL-2.txt
- GPL version template:
Understand the scope of the XMPCore Java API
integrationThe XMPCore Java API is a subset of the full Adobe XMP Toolkit. It provides theXMPCorefunctionality for handling Extensible Metadata Platform (XMP) data but does not include theXMPFilescomponent. Use this library specifically for metadata manipulation and core XMP logic rather than file-system-level XMP operations.Set up XMPCore projects in Eclipse 3.0.x
integrationFor older Eclipse versions, you must manually create the Java projects pointing to the external source folders:
- Start Eclipse with an empty workspace.
- Go to File > New > Project > Java Project.
- Set the Project Name to
XMPCore. - Select Create project at external location and browse to the
XMPCorefolder (located in the same directory as this README). - Click Finish.
- To include the coverage example, repeat these steps for the
XMPCoreCoveragefolder.
Prepare the release branch for license header application
integrationBefore applying license headers, ensure you are working on the correct release branch and that your working directory is clean. This example assumes you are using a bash shell and the remote is named
origin.- Clone the repository (if not already cloned):
git clone git@github.com:veraPDF/veraPDF-library.git cd veraPDF-library - Fetch the latest changes:
git fetch origin - Checkout the specific release branch (e.g.,
release-0.8) and pull the latest:git checkout -b release-0.8 origin/release-0.8 git pull origin release-0.8 - Verify the working directory is clean:
git status
git clone git@github.com:veraPDF/veraPDF-library.git cd veraPDF-library git fetch origin git checkout -b release-0.8 origin/release-0.8 git pull origin release-0.8 git status- Clone the repository (if not already cloned):
Apply MPL source headers using Maven
integrationTo add MPL license headers to the source code, create a new branch from the release branch and use the Maven
license:formatgoal with theapply-mpl-headerprofile.- Create a new branch:
git checkout -b release-0.8-mpl origin/release-0.8 - Apply headers and verify with Maven:
mvn license:format -P apply-mpl-header mvn clean install - Commit the changes:
git add . git commit -m "Added MPL source headers."
git checkout -b release-0.8-mpl origin/release-0.8 mvn license:format -P apply-mpl-header mvn clean install git add . git commit -m "Added MPL source headers."- Create a new branch:
Install veraPDF CLI without GUI
integrationStarting from version 1.30 RC, the installer includes a new option to install only the Command Line Interface (CLI) without the Graphical User Interface (GUI).Extend feature extraction with plugins
integrationStarting from version 0.16, the veraPDF command line interface supports plugin execution. This allows developers to extend the feature extraction capabilities of the conformance checker by implementing custom plugins. Example pure Java plugins are available in the repository, and an optional sample plugin pack can be obtained through the installer.
# Command line support for plugin execution to extend feature extractionDownload veraPDF-library source code
integrationYou can obtain the source code in two ways depending on whether you want the stable release or the latest development version.
Latest Release Source
To get the latest release, clone the repository and switch to the
masterbranch:git clone https://github.com/veraPDF/veraPDF-library cd veraPDF-library git checkout masterAlternatively, download the
.tar.gzor.ziparchives directly from GitHub.Latest Development Source
To get the latest development version, clone the repository and switch to the
integrationbranch:git clone https://github.com/veraPDF/veraPDF-library cd veraPDF-library git checkout integrationAlternatively, download the
.tar.gzor.ziparchives for theintegrationbranch from GitHub.Pre-requisites for building veraPDF-library
integrationTo build the library from source, you must have the following installed on your system:
- Java: Versions 8, 11, 17, 21, or 25.
- Maven: Version 3 or higher.
- Git: Recommended for managing the source code.
Build XMPCore debug and release libraries
integrationThe XMPCore library is built using Apache ANT. To generate the debug and release JAR files, run the
build.xmlscript located within theXMPCoreproject directory.ant -f XMPCore/build.xml