Sometimes you need to validate a PDF file. Here are step by step instructions on how to do so. Prerequisites: You need to have Java installed on your machine.
- Download preflight-app-2.0.21.jar from https://pdfbox.apache.org/download.cgi
- Run it passing the path to your PDF file like so:
$ java -cp preflight-app-2.0.21.jar org.apache.pdfbox.preflight.Validator_A1b test.pdf
References:
- https://github.com/apache/pdfbox/blob/2.0.21/preflight/src/main/java/org/apache/pdfbox/preflight/Validator_A1b.java
- https://github.com/apache/pdfbox/blob/2.0.21/preflight-app/pom.xml
- https://pdfbox.apache.org/1.8/cookbook/pdfavalidation.html
- https://www.pdfa.org/wp-content/until2016_uploads/2011/08/PDFA-in-a-Nutshell_1b.pdf