Krishna Kishore .J wrote:

Hi Bruno,
Thanks for your immediate reply. Pls read. I have a pdf (input.pdf) form some thing like this: Name:
 Company:
Now i have to read this pdf form and add content for name and age, the resultant pdf should be like this: Name: Kishore
 Company: CEI

I guess you are using PdfStamper to fill in the fields.

<> The problem i am encountering is when i open the input pdf form (input.pdf) and insert text,

manually?

the existing content is gone and its displaying only the new content on the resultant pdf.

Isn't that expected behaviour?
If you don't want the end user to be able to change the filled in fields, you need to flatten the PDF. This is documented in the tutorial.
http://itextdocs.lowagie.com/tutorial/general/copystamp/#pdfstamper

There's an example that is almost exactly the same as the case you describe.
There's an empty form:
http://itextdocs.lowagie.com/tutorial/general/copystamp/SimpleRegistrationForm.pdf
It's filled in with iText in two different ways:
http://itextdocs.lowagie.com/tutorial/general/copystamp/registered.pdf
(the fields can be changed after iText filled them in) and
http://itextdocs.lowagie.com/tutorial/general/copystamp/registered_flat.pdf
(the fields can't be changed; the form is 'flattened')

br,
Bruno


-------------------------------------------------------
This SF.Net email is sponsored by: NEC IT Guy Games.  How far can you shotput
a projector? How fast can you ride your desk chair down the office luge track?
If you want to score the big prize, get to know the little guy. Play to win an NEC 61" plasma display: http://www.necitguy.com/?r=20
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Reply via email to