Is it possible that this document is a PDF form created by Adobe  
Designer?

Leonard

On Nov 19, 2007, at 3:51 PM, <[EMAIL PROTECTED]>  
<[EMAIL PROTECTED]> wrote:

> Hello,
>
> PdfReader reader = new PdfReader(pdfFile);
> int pageCount = reader.getNumberOfPages();
>
> getNumberOfPages() in above line of code returns
> the correct number of pages most of the times, when the document in  
> question (pdfFile) is a reader 7 PDF document,
> But it throws the exception below for reader 8.x PDF documents.
> We would need to get page count and we would need to let users use  
> reader 8. How to get the number of pages off reader 8.x pdf  
> documents? Any help on this you could provide would be greatly  
> appreciated.
>
> Thanks,
> Hareg
>
> java.io.IOException: trailer not found.
>
>       at com.lowagie.text.pdf.PdfReader.rebuildXref(Unknown Source)
>
>       at com.lowagie.text.pdf.PdfReader.readPdf(Unknown Source)
>
>       at com.lowagie.text.pdf.PdfReader.<init>(Unknown Source)
>
>       at com.lowagie.text.pdf.PdfReader.<init>(Unknown Source)
>
> ---------------------------------------------------------------------- 
> ---
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft(R) Visual Studio 2005.
> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> _______________________________________________
> iText-questions mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/itext-questions
> Buy the iText book: http://itext.ugent.be/itext-in-action/
>


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://itext.ugent.be/itext-in-action/

Reply via email to