"Paulo Soares" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
Works for me and I get this FDF.

> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On
> Behalf Of Wahaj Khan
> Sent: Tuesday, July 05, 2005 2:11 PM
> To: [email protected]
> Subject: [iText-questions] Writing FDF using an existing PDF
>
> Hi,
>
> I am reading a PDF containing some form fields and trying to
> create an FDF
> out of it but getting an exception using iText-Paulo 154.  I
> am using the
> following code on the attached pdf document;
>
>      PdfReader pdf = new PdfReader("C:\\test.pdf");
>       FdfWriter fdf = new FdfWriter();
>       fdf.setFields(pdf.getAcroFields());
>       fdf.setFile("fdf_write.pdf");
>
>       fdf.writeTo(new FileOutputStream("C:\\test-fdf.fdf"));
>
> Exception:
>
> java.io.IOException: PDF header signature not found.
>  at
> com.lowagie.text.pdf.PRTokeniser.checkPdfHeader(PRTokeniser.java:204)
>  at com.lowagie.text.pdf.PdfReader.readPdf(PdfReader.java:465)
>  at com.lowagie.text.pdf.PdfReader.<init>(PdfReader.java:156)
>  at com.lowagie.text.pdf.PdfReader.<init>(PdfReader.java:145)
>  at com.pdf.test.WriteFDF.writeFDF(WriteFDF.java:36)
>  at com.pdf.test.WriteFDF.main(WriteFDF.java:24)
>
> Is the above way supported in iText ?
>
> Regards,
> Wahaj
>
>
>





-------------------------------------------------------
This SF.Net email is sponsored by the 'Do More With Dual!' webinar happening
July 14 at 8am PDT/11am EDT. We invite you to explore the latest in dual
core and dual graphics technology at this free one hour event hosted by HP, 
AMD, and NVIDIA.  To register visit http://www.hp.com/go/dualwebinar
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Reply via email to