am using iTextSharp ( .NET 2.0 Vista ). The iTextSharp Version is 4.1.2.0
PdfReader reader = new PdfReader(pdfFile);
is causing the library to thrown an exception saying
"Trailer not found"
The file exists and can be viewed in Adobe no problem
Any ideas?
The trailer is a part the structure of a PDF file. If you're getting an error saying it can't be found then the first thing I'd think is your file is corrupt. Being able to open the PDF in a PDF viewer program doesn't necessarily mean the PDF isn't corrupt; I understand that if it's a linearized PDF file the viewer won't attempt to use the trailer.
Does your code throw an IOException for any PDF you attempt to read?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With