-1

I have a requirement where I have to fill data to already existed PDF document using JAVA . I have looked at itext and PDFbox but they have examples of creating new PDF not with already existing PDF forms.
I don't know coordinates or cells of this PDF since its provided by realestate vendor . I can change anything in the form .

Is there any way to fill this form using Java ?
Tanks for help,

Tony

user3079116
  • 1
  • 1
  • 1
  • http://stackoverflow.com/questions/3335126/itext-add-content-to-existing-pdf-file should work – Barun Dec 08 '13 at 04:39
  • *I have looked at itext and PDFbox but they have examples of creating new PDF not with already existing PDF forms.* [FillDataSheet](http://itextpdf.com/examples/iia.php?id=122) iText example. – mkl Dec 08 '13 at 16:47
  • *I have looked at itext and PDFbox but they have examples of creating new PDF not with already existing PDF forms.* [SetField](http://svn.apache.org/repos/asf/pdfbox/trunk/examples/src/main/java/org/apache/pdfbox/examples/fdf/SetField.java) PDFBox example – mkl Dec 08 '13 at 16:57

1 Answers1

0

Code from this post works: How to set a value in PDF form using Java pdfbox api

You need to know the name of the fields to set though. To get a list of field names you can use this snippit:

 List<PDField> alFields = acroForm.getFields();
 for(PDField f:alFields){
    System.out.println(f.getFullyQualifiedName());
 }
Community
  • 1
  • 1
jkerr
  • 31
  • 2