veraPDF-library

repository·integration·Indexed 43 days ago

https://github.com/verapdf/verapdf-library

A 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.

Tokens
5.2K
Snippets
13
Records
35
Agent score
56%

What's inside veraPDF

  1. Understand veraPDF dual-licensing and header templates

    integration

    All 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/template sub-folder of the repository:

    • GPL version template: license/template/GPL-3.txt
    • MPL version template: license/template/MPL-2.txt
  2. Understand the scope of the XMPCore Java API

    integration
    The XMPCore Java API is a subset of the full Adobe XMP Toolkit. It provides the XMPCore functionality for handling Extensible Metadata Platform (XMP) data but does not include the XMPFiles component. Use this library specifically for metadata manipulation and core XMP logic rather than file-system-level XMP operations.
  3. Set up XMPCore projects in Eclipse 3.0.x

    integration

    For older Eclipse versions, you must manually create the Java projects pointing to the external source folders:

    1. Start Eclipse with an empty workspace.
    2. Go to File > New > Project > Java Project.
    3. Set the Project Name to XMPCore.
    4. Select Create project at external location and browse to the XMPCore folder (located in the same directory as this README).
    5. Click Finish.
    6. To include the coverage example, repeat these steps for the XMPCoreCoverage folder.
  4. Prepare the release branch for license header application

    integration

    Before 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.

    1. Clone the repository (if not already cloned):
      git clone git@github.com:veraPDF/veraPDF-library.git
      cd veraPDF-library
    2. Fetch the latest changes:
      git fetch origin
    3. 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
    4. 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
  5. Apply MPL source headers using Maven

    integration

    To add MPL license headers to the source code, create a new branch from the release branch and use the Maven license:format goal with the apply-mpl-header profile.

    1. Create a new branch:
      git checkout -b release-0.8-mpl origin/release-0.8
    2. Apply headers and verify with Maven:
      mvn license:format -P apply-mpl-header
      mvn clean install
    3. 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."
  6. Extend feature extraction with plugins

    integration

    Starting 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 extraction
  7. Download veraPDF-library source code

    integration

    You 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 master branch:

    git clone https://github.com/veraPDF/veraPDF-library
    cd veraPDF-library
    git checkout master

    Alternatively, download the .tar.gz or .zip archives directly from GitHub.

    Latest Development Source

    To get the latest development version, clone the repository and switch to the integration branch:

    git clone https://github.com/veraPDF/veraPDF-library
    cd veraPDF-library
    git checkout integration

    Alternatively, download the .tar.gz or .zip archives for the integration branch from GitHub.