1

I need to supply PDF files to Hylafax Server and server expects PDF to be valid.

Is there any java API that supports to validate weather PDF document is PDF/A or PDF compliant?

Below are the ways to manually verify the document is valid or not:

Linux: Run file fileName.pdf command and observe output if it is fileName.pdf: data then document may be non-compliant PDF

Windows: Right click on File -> Go to Details Page -> check for Attributes if Attributes field value is 'N' then document may be non-compliant PDF. It should have value 'A'.

Can I validate document using any API?

Tim Biegeleisen
  • 502,043
  • 27
  • 286
  • 360
Bhavesh
  • 519
  • 6
  • 26
  • Checking the attribute isn't sufficient to check if a PDF is PDF/A compliant. This is a duplicate of [.net validation of pdfa file](http://stackoverflow.com/questions/29822154/net-validation-of-pdfa-file) I know that the question I refer to is about vb.net, but the answer is true in general, also for Java. – Bruno Lowagie Jun 30 '15 at 06:26
  • Thanks for swift response. In your referenced SO link ,it shows that pdf-conformance-checker is still under construction. However as per below update Raj has mentioned apache API https://pdfbox.apache.org/1.8/cookbook/pdfavalidation.html. Will you recommend this for the purpose. – Bhavesh Jun 30 '15 at 07:29
  • 1
    The EU started the project because none of the existing validators was sufficient for their needs. PDF/A files created with tool A were valid according to the validator of tool A. PDF/A files created with tool B were valid according to the validator of tool B. But as soon as you mixed tools and validators, problems emerged. PDF/A files created with tool B weren't valid according to the validator of tool A. And so on... – Bruno Lowagie Jun 30 '15 at 07:33
  • So at the moment there is no tool that completely verifies – Bhavesh Jun 30 '15 at 08:18
  • But there are tools that do some verification. Maybe those are sufficient for your needs. – Bruno Lowagie Jun 30 '15 at 08:21
  • I understand the complexity as there are many standards and each one particular validator may not be able to validate document created by other tool. So at the moment there is no tool that completely verifies validity of document.https://github.com/veraPDF/veraPDF-corpus is for PDF/A specification. There is no release yet from this. I am getting confused with what validator should I go at the moment. – Bhavesh Jun 30 '15 at 08:24

1 Answers1

1

I do not have knowledge to contradict Bruno Lowagie on subjects regarding pdf. He must be right 100% .

But just take a look at the links below . Maybe these may help you . From Bruno's comments I am guessing these may not be 100% accurate or maybe incorrect.

PDF/A Validation The Apache Preflight library is a Java tool that implements a parser compliant with the ISO-19005 specification (aka PDF/A-1). Check Compliance with PDF/A-1b

https://pdfbox.apache.org/1.8/cookbook/pdfavalidation.html

The 3-Heights™ PDF Validato

The 3-Heights™ PDF Validator safeguards the quality of PDF documents and the processes that create them. Documents are checked for compliance with the ISO standards for PDF and PDF/A documents.

http://www.pdf-tools.com/pdf/pdf-validator-pdfa-validate-iso.aspx

http://www.pdf-tools.com/pdf/Support/FAQ/Article.aspx?name=JNI

FREE PDF/A Validator(Not sure if api exist)

This free online service uses the industry leading PDF/A validator from Solid PDF Tools. Solid PDF Tools can do much more than PDF/A validation

http://www.validatepdfa.com/

JHOVE - JSTOR/Harvard Object Validation Environment

http://sourceforge.net/p/jhove/wiki/Home/

Also please read the below stackoverflow links

.net validation of pdfa file

How can I test a PDF document if it is PDF/A compliant?

http://sourceforge.net/p/jhove/wiki/Home/ http://www.validatepdfa.com/

Community
  • 1
  • 1
Raj
  • 1,945
  • 20
  • 40