Hi,

I'm trying to make a new field.
What I'm doing right now is I make a new document and insert the field to the new document.
So let say I have input.pdf file which contains the original file and result.pdf which contain only the new fields. So how do I concantenate them? Is it the right way to insert the field?

Below are sample of my code.
     Document document = new Document();
      FileOutputStream file_result = new FileOutputStream("result.pdf");  
      PdfWriter writer = PdfWriter.getInstance(document, file_result);
      document.open();
      TextField field1 = new TextField(writer, new Rectangle(50, 760, 50 + 100, 760+50), "Value1");     
      PdfFormField fieldt1 = field1.getTextField();
      writer.addAnnotation(fieldt1);
      document.close();
      writer.close();
     

Then what should I do next? Is this the right step?

Thanks.
Nicholas.

Reply via email to