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
> 
> 
> 

Attachment: test-fdf.fdf
Description: test-fdf.fdf



Reply via email to