tags:

views:

94

answers:

2

Hi, is there a third party library in .net that could determine properly if the pdf file is corrupted or not? We've been using ABCPDF but it have some problems in determining some files if it corrupted or not. Is there other third party libraries much better than ABCPDF in determining if the pdf file is corrupted or not?

Thanks in advance.

+2  A: 

There are specific tools to check PDF files.

If files cannot be read by PDF libraries it may not be that they are corrupt, and there are many things that can go wrong in a PDF. It may be that they are not in an expected format. For instance a PDF library may expect Font to be embedded etc. If you need to check PDF files that need to be printed or placed in a print workflow for instance, there are validation tools called "Preflight Tools" that can check specific things within a PDF and in some cases can fix these issues.

Have a look at these links:

http://en.wikipedia.org/wiki/Pre-flight_(printing)

http://www.markzware.com/

http://www.onevision.com/asura.html

Mark Redman
+1  A: 

Just a quick search comes up with several readers for PDF, reading the file and traversing the elements might be enough to validate it...?

http://itextsharp.sourceforge.net/

http://pdfsharp.com/PDFsharp/

http://www.pdflib.com/

Pdf parsers for .net: http://www.vicman.net/download/13733/

csharptest.net