dlsimic
asked on
check if a PDF file is corrupt in C#
I need to validate that a PDF is not corrupt. Any ideas?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
What commercial licensing? It's AGPL.
ASKER
Maybe I am reading the licensing wrong. But it appears that if I were to distribute code with this dll in it then I need to have a commercial license.
This statement is taken from their website:
"Buying a commercial license is mandatory as soon as you begin activities including distribution of iText software inside your product or deploying it on a network without disclosing the source code of your own applications under the AGPL license."
This statement is taken from their website:
"Buying a commercial license is mandatory as soon as you begin activities including distribution of iText software inside your product or deploying it on a network without disclosing the source code of your own applications under the AGPL license."
Please post a link...
Hmmm - the Adobe Acrobat Reader comes with some kind of ActiveX control you could bind into a VS application as PDF viewer (that way you could i.e. view some kind of help PDF within your application). I think it's a s free as the reader itself.
Just add the appropriate reference in Visual Studio to access it.
Try to load the file in this and it should throw an exception if the file is too corrupted to load. Anyhow I would expect possible that a file is corrupted in a way that allows it to load but displays garbage anyhow. In that case you'd have to implement a full blown PDF syntax parser to detect flaws ;-)
Just add the appropriate reference in Visual Studio to access it.
Try to load the file in this and it should throw an exception if the file is too corrupted to load. Anyhow I would expect possible that a file is corrupted in a way that allows it to load but displays garbage anyhow. In that case you'd have to implement a full blown PDF syntax parser to detect flaws ;-)
Yup, read it again. It's free as long as you respect AGPL:
While the AGPL license has no direct financial cost, there are clear requirements for AGPL use. Buying a commercial license is mandatory as soon as you develop activities involving the iText software without disclosing the source code of your own applications.
ASKER