views:

281

answers:

1

I recently downloaded pdf libraries ( pdfbox, pdfsharp, itextsharp), and I am trying to figure out can i parse corrupted pdf files with in Asp.Net. which lib is best for reading corrupted pdf file.

+1  A: 

If the file is corrupt, there is no guaranteed way to read it. You cannot know which part or parts are corrupt. You could use a hex editor utility and manually inspect which parts might be corrupted, but there is no way to use any of the libraries you mentioned to open a corrupted file. They all work off the PDF specification, which assumes a valid PDF file.

Stewbob