Fill and save fillable pdf forms using database data and manually entered data

Hi,


I am using ASP.Net MVC application.

My requirement is , I need to fill the fillable pdf form (IRS Tax form) with database data and open it in a web page. From there i need to manually edit the data and save it in clients computer.

Is aspose help me on this. ?

Thanks,
Sandeep

Hi Sandeep,

Thanks for your inquiry. Yes you can fill PDF form using Aspose.Pdf from database data, either retrieving data into some DataTable/DataView and assign values to form fields to Fill forms or Import FDF/XFDF/XML data into PDF form. Please check following documentation links for more details.

Moreover, to open PDF form into client browser, you need to save PDF form into stream and send to customer browser using response object. Once it form is open into client browser he/she can edit and save.

Please feel free to contact us for any further assistance.

Best Regards,

Hi i want to develop fillable pdf using xml in java. Can you please help me with example

@venkat.thungathurthi,

We auto-port Aspose.Pdf for Java API from its equivalent .NET version. Please refer to this help topic: Import Data from XML into a PDF File (facades)

Hi, How to create Tag ID on fillable fields using aspose.pdf for Java

@venkat.thungathurthi,

Are you looking to add Tag ID stamp around the fill able fields? If so, then Rect member of the field instance returns rectangular coordinates, and with the help of the rectangular coordinates, you can add text or image stamp around the fill able field. Please refer to this help topic: Add Text and Image Stamp

Furthermore, please send us your input and expected output PDF documents. We will investigate and share our findings with you.

Yes i am looking to add Tag ID for all the fillable fields.
when i open the PDF file using Acrobat Professional, the fillable field should show me the place holder with Tag ID so that other programs can fill the data into this field .

@thunga_venkat,

Kindly send all details of the scenario, including source PDF, code and a sample of expected output. We will investigate and share our findings with you.

I have already forwarded an email with all docs to your email id Rafique on Jan 29th.

@thunga_venkat,

I could not track the message from your email Id. Kindly send files through the private forum message or upload to any free file sharer server, e.g. Google drive, and then send us a download URL. We do not recommend to send emails. Your response is awaited.

I created TestAsposeFeasibility_Output_1.pdf using aspose.pdf API with labels & fillable fields.
Some third party company (consumers of this document) using their tool (not known) have to programmatically fill the data into these fillable fields as shown in second document TestAsposeFeasibility_Output_1.pdf
To fill the data programmatically into fileable fields, need Tag IDs for each fillable field.
Tried opening the document with Acrobat professional, I don’t see any Tag ID associated with the field.

Please help me out how to create Tag IDs to each fillable fields or the work around.
TestAsposeFeasibility_Output_1.pdf (44.3 KB)
TestAsposeFeasibility_Output_2.pdf (1.1 MB)

@thunga_venkat,

You can fill data programmatically into fill able fields by field name. Please refer to this help topic: Modify Form Field in a PDF Document.

You can see field names while editing the form with Acrobat. Snapshot: https://i.imgur.com/Zq2z2EN.png

While editing i see field names Field_1, Field_2 …etc. Is there any way to customize these field names?
Example: instead of Field_1, can it be changed to Landowner
Field_2, can it be changed to Date

I see the API had getFullName() but doesnot have a setFullName().

@thunga_venkat,

You need to change the partial name property. Please try the following code example:
Java

String dataDir = "C:\\Pdf\\test652\\";
// Open document
Document pdfDocument = new Document(dataDir + "TestAsposeFeasibility_Output_1.pdf");
Field[] formField1 = pdfDocument.getForm().getFields();
formField1[0].setPartialName("Landowner");
pdfDocument.save(dataDir + "Output.pdf");
1 Like

Thanks! Imran. This fixed my issue.