How do i use an existing PDF and fill out the information given by the user online or in a java program. I know itext and pdfbox are used but they are all showing documentation to create a new pdf and then fill out the information. My problem is that I need to take an existing PDF and fill out the information there which will be collected online by the user. So for example, creating a online Tax softwrare and filling out that information to PDF in Backend?? Please help or guide me to the right direction, thank you
Asked
Active
Viewed 728 times
0
-
Take a look at this link http://www.4guysfromrolla.com/articles/030211-1.aspx#postadlink It shows how to fill in a pdf form using itextsharp. – ovaltein Feb 21 '14 at 19:32
-
you are awesome, i am a CPA but i have good exposure in Java and i am trying to learn other languages to create a tax software in canada and hopefully in US when we get exposure, thanks – user231767 Feb 21 '14 at 20:35
-
is there a way to do this is JAVA or Jsp intead of ASP, does it matter. – user231767 Feb 21 '14 at 22:49
1 Answers
0
Please take a look at the reporting examples. They involve an existing PDF: state.pdf that can be filled out in different ways. One could fill out the PDF and submit it, as is done in the example from my book: subscribe.pdf. Unfortunately, a number of PDF viewers (such as Chrome PDF viewer) don't support this. You can also fill out an HTML form and use the data to fill out the PDF. See for instance the iText samples I prepared for a tutorial video. You can pre-fill a form or flatten it.
The standalone examples can be found on itextpdf.com; the web app examples are available on github.
Some additional remarks:
- The examples explain how to work with AcroForm technology. They don't discuss XFA.
- If you intend to create a commercial product, please understand that you may need to purchase a license for your use of iText.
- Tax authorities of different countries (including the IRS in the US) are a customer of iText Software, using iText in the exact way you're describing.

Bruno Lowagie
- 75,994
- 9
- 109
- 165