We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Detecting a Corrupt PDF

Hi Team,


We are using 9.7.0.0 verion of Aspose.Pdf for all kinds of PDF operations. I am facing a problem in detecting a corrupted PDF file. Aspose.Pdf .Document class successfully loads a corrupt PDF and even provides the Page Count accurately.

My requirement is to determine if PDF is corrupt and if it is corrupt, I don’t want to go ahead with the processing. Is there any way to detect a corrupt PDF file using Aspose.Pdf ? I searched the Aspose.Pdf forum but couldn’t find anything positive for this.

I have also attached one corrupt PDF file, which I created by opening the PDF file in notepad and deleting some content. Kindly suggest.

Regards,
Anto Paul Thekkan

Hi Team,


Can you please guide me on this ?

Regards,
Anto Paul Thekkan

Hi Anto Paul,


Thanks for contacting support and sorry for the delayed response.

I have tested the scenario and have managed to notice that page count of 10 is being returned when suing following code snippet. However when viewing the document in Adobe Reader 11.0, an error message is being displayed. For the sake of correction, I have logged this problem as PDFNEWNET-39630 in our issue tracking system. We will further look into the details of this problem and will keep you updated on the status of correction. Please be patient and spare us little time. We are sorry for this inconvenience.

[C#]

Document document = new Document(“c:/pdftest/CORRUPTED.pdf”);

Console.WriteLine(document.Pages.Count);

Hi Shahbaz,


Thanks for your reply. Please keep me updated on your findings.
It will be really helpful if you could find a solution for this issue.

Regards,
Anto Paul Thekkan


Hi Anto Paul,


As soon as the issue gets resolved, we will surely intimate you within this forum thread and you will get a notification in email address registered with our website.

Hi Shahbaz,


Wanted to confirm if the 9.7.0.0 version of Aspose.Pdf has a fix for this problem ?
From your previous mail, did you mean that this issue may be fixed in a future release ?
The reason why i ask is because I wanted an immediate fix for this issue.

Regards,
Anto Paul Thekkan

Hi Anto Paul,


Thanks for sharing the details.

During my testing, I used the latest release of API and managed to reproduce it. Also please note that fix for this problem will be included in future releases of Aspose.Pdf for .NET and I am afraid we might not be able to fix the issue in previous release versions.

Now concerning to urgency of this issue, please note that problems are fixed in first come first serve basis as we believe its the fairest policy to all the customers and this problem will be fixed according to development schedule.

Hi Shahbaz,


Thanks for your mail. Please notify us when this issue gets fixed in your future release.

Regards,
Anto Paul Thekkan

Hi Anto Paul,


Thanks for your feedback. Sure, we will notify you as soon as made some significant progress towards issue resolution.

Thanks for your patience and cooperation.

Best Regards,

Hi Tilal,


Thanks for your mail. Any update on the fix for this issue ? Any tentative date planned ?

Regards,
Anto Paul Thekkan

Hi Anto Paul,


Thanks for your patience.

I am afraid the issue reported earlier is still pending for review and is not yet resolved. However as soon as we have some further updates, we will let you know. Please be patient and spare us little time. Your patience and comprehension is greatly appreciated in this regard.