Yes - the document I tested with is a PDF form created by Adobe  
Designer. ( but the same form works fine when it is saved with reader 7)
Thanks,
Hareg

From: Leonard Rosenthol <leonardr <at> pdfsages.com>
Subject: Re: iText:PdfReader page count issue with adobe reader 8.x?
Newsgroups: gmane.comp.java.lib.itext.general
Date: 2007-11-20 00:01:10 GMT (1 day, 19 hours and 12 minutes ago)

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

Leonard

On Nov 19, 2007, at 3:51 PM, <h.abay <at> verizon.net>  
<h.abay <at> verizon.net> 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/

Reply via email to