This post explains how to fill Acroform using your favorite languages. Here is the short description of Acroform from Wiki:
AcroForms were introduced in the PDF 1.2 format.
Alongside the standard PDF action types, interactive forms (AcroForms) support submitting, resetting, and importing data. The “submit” action transmits the names and values of selected interactive form fields to a specified uniform resource locator (URL). Interactive form field names and values may be submitted in any of the following formats, (depending on the settings of the action’s Export Format, SubmitPDF, and XFDF flags)
In LevelFive Solutions, we use Acroform for our clients to fill the existing pdf documents. This post is categorized in the following order which helps you to follow the your favorite language implementation. Here is the flow in the document
- Create Acroform using tool
- Implementations in Java, .net
Create Acroform using tool
There are lots of tools available to create the Acroform. One of its Adobe Acrobat Pro. I am using this tool to create or rather convert the existing document in .docx to Acroform. Here it is goes.
For this section, you assume you have the document which has the table. It looks like one below:
Step 1: Convert the above document to PDF. To convert that, Microsoft itself provides the free tool. Here it is the link
Step 2: Open the document in Adobe Acorobat Professional X or Nitro PDF
Step 3: Click Create –> PDF Form
Step 4: Click Next and accepts all the defaults. It looks like below:
It automatically names each field. You can even change it by double clicking it.
Once its done. Save the document. I have already shared the sample in each implementation.
Implementation in Java
We have shared the code git. The location is https://github.com/lfsolutions/acroform-java
The source code needs the following library in the classpath
Implementation in .net
We have shared the code git. The location is https://github.com/lfsolutions/acroform-net
The source code needs the following lib in the references.
We can do more with the iText library. If you have any other scenarios, please shared. We can give you the right guidance.