Giter Site home page Giter Site logo

pdfvalidator-services-rest's Introduction

PDF Validator Services REST

CD

How to use

Validate PDF files for PDF/A compliance with a simple REST API. It can be used to validate a file like this:

curl -v -X POST -F '[email protected]' http://localhost:8080/validate  

If the validation was a success, the service will return JSON like this:

{
    "flavour": "PDFA_1_B",
    "result": "valid"
}

If it was unvalid or unable to complete the validation, it will either return result invalid or unknown.

If you want to validate the PDF against a specific PDF/A flavour, it can be specified with the flavour parameter:

curl -v -X POST -F 'flavour=1a' -F '[email protected]' http://localhost:8080/validate

{
    "errors": [
        "ISO 19005-1:2005, 6.8.3, test no. 1: The logical structure of the conforming file shall be described by a structure hierarchy rooted in the StructTreeRoot entry of the document catalog dictionary, as described in PDF Reference 9.6",
        "ISO 19005-1:2005, 6.8.2, test no. 1: The document catalog dictionary shall include a MarkInfo dictionary with a Marked entry in it, whose value shall be true.",
        "ISO 19005-1:2005, 6.7.11, test no. 3: A Level A conforming file shall specify the value of pdfaid:conformance as A."
    ],
    "flavour": "PDFA_1_A",
    "result": "invalid"
}

License

All source code licensed under the Apache 2.0 license. Some test files © 2015 veraPDF Consortium, licensed under Creative Commons Attribution 4.0 International (CC BY 4.0)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.