Skip to main content
kevins17337209
Participant
May 26, 2017
Pregunta

If we've already captured the user information, is there a way to programmatically fill in a PDF form?

  • May 26, 2017
  • 2 respuestas
  • 2255 visualizaciones

If we've already captured the user information, is there a way to programmatically fill in a PDF form (e.g. using an API)?

Este tema ha sido cerrado para respuestas.

2 respuestas

NKOWA555
Inspiring
May 26, 2017

Sure, one way to prefill a PDF is to create a FDF file using FDFToolkit.net/iTextSharp. The FDF file can open in Adobe Reader and populate the fields. Another way is to "merge" the data with a blank PDF using FDFToolkit.net/iTextSharp.

FDFToolkit.net lets developers import data from EXCEL, MSAccess, MSSQL and any other ADO.net data source; or you can manually import each field value. FDFToolkit.net/iTextSharp (open-source) requires programming knowledge, and both libraries work with Visual Studio .NET (free).

Visit the following website for more information and examples:

fdftoolkit.net/examples/

try67
Community Expert
Community Expert
May 26, 2017

You need to be much more specific than that... How did you capture the user information? In what environment and using what technology?

kevins17337209
Participant
May 26, 2017

Our application is a Ruby on Rails application hosted on AWS.  We've captured the user information and it's stored in our Postgres SQL database.

For example, we've already captured the information necessary to fill out the blank form fields for the W-9 form at https://www.irs.gov/pub/irs-pdf/fw9.pdf.  Via our RoR app, we'd like the user to be able to click a "Send me the completed W-9 form" button, our RoR application auto-fills in this pdf form with the user's information stored in our database, then returns a completed form to the end user (e.g. completed form gets downloaded into their "Downloaded" folder on their PC).

try67
Community Expert
Community Expert
May 26, 2017

It's not so simple... This form was created using LiveCycle Designer. If you want to import data to it you can't use an FDF file, only XML/XDP/XFD. And there are not many applications that know how to do it correctly.