Doing the following line is successful:
int file1Pages = new PdfReader("fileName.pdf").getNumberOfPages();
However, doing the following fails with the exception stated below:
byte[] pdfByteArray; // Content obtained from a database BLOB.
int file1Pages = new PdfReader(pdfByteArray).getNumberOfPages();
Exception:
Rebuild failed: trailer not found.; Original message: PDF startxref not
found.
The content is exactly the same.
Extracting the BLOB from the database into a file and opening the file with
Adobe Reader works.
The PDF is indeed lacking a trailer. However, reading it from a file and
not from a byte stream is nevertheless successful.
Where am I going wrong?
--
View this message in context:
http://itext-general.2136553.n4.nabble.com/Concatenate-document-fill-form-document-and-dynamic-document-tp2168780p4651953.html
Sent from the iText - General mailing list archive at Nabble.com.
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions
iText(R) is a registered trademark of 1T3XT BVBA.
Many questions posted to this list can (and will) be answered with a reference
to the iText book: http://www.itextpdf.com/book/
Please check the keywords list before you ask for examples:
http://itextpdf.com/themes/keywords.php