0

Is it possible to populate the form fields with URL parameters of a PDF hosted on a 3rd party server?

For example, I'd like to collect user data via HTML input fields and use JavaScript to generate a link (which contains the URL parameters with variables defined in the input fields) to the government hosted 1040 form, where it would populate the form fields first_name and last_name.

Something like

http://www.irs.gov/pub/irs-pdf/f1040.pdf?first_name=Mark&last_name=Miller

Is this possible or would I need to host the PDF on a server where I could access the PDF's DOM?

markmiller
  • 160
  • 1
  • 1
  • 10

1 Answers1

0

PDF doesn't have document object model or DOM. However, as far as I understand your question, you can generate pdf document from html page width dynamic content by using some server-side library. Check out this question if you are using PHP Convert HTML + CSS to PDF with PHP?

Community
  • 1
  • 1
Dmitry
  • 729
  • 7
  • 19
  • Thanks for the response, however I am not looking to convert HTML to a PDF. I am trying to fill in the PDF form values via JavaScript. – markmiller Apr 17 '15 at 19:07