Thank you for the insight.
Does this mean the issue is only with dynamic forms? Using iText, I could get
correct page count off other reader 8.x PDF docs?
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-21 22:10:54 GMT (6 days, 3 hours and 16 minutes ago)
Yes, but Acrobat/Reader 8.x and Acrobat/Reader 7.x treat dynamic
forms VERY differently.
Acro/Reader 7 would create a "classic PDF mirror" of the dynamic
form, so that non-XFA-aware tools could do some basic processing on
the PDF (as you are trying to do) - but too many problems were caused
when the form was reloaded into Acrobat/Reader and the changes made
outside were blown away.
To avoid this, Acrobat/Reader 8.x no longer creates the mirror -
instead it just keeps a "shell" around...
Leonard
On Nov 21, 2007, at 2:16 PM, <h.abay <at> verizon.net>
<h.abay <at> verizon.net> wrote:
> 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)
-------------------------------------------------------------------------
SF.Net email is sponsored by: The Future of Linux Business White Paper
from Novell. From the desktop to the data center, Linux is going
mainstream. Let it simplify your IT future.
http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
_______________________________________________
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/