Skip to main content
Participant
June 26, 2017
Question

Submitting an embedded PDF form on a webpage

  • June 26, 2017
  • 1 reply
  • 1187 views

Hi everyone,

I'm having trouble with the form submission functionality with a .PDF form embedded in a webpage, but I'm having very mixed results depending on the browser that I'm using. The HTML code I'm using to embed the pdf is:

<embed src="[Local Path to .pdf file] width="1000" height="800" type='application/pdf' />

The form I'm using has a "Submit Form" button which runs a javascript sending the form data to a Java servlet in XML format. Here's what I'm finding when testing in several browsers:

On Internet Explorer, the form loads successfully, the user can edit it, and hitting the "submit form" button sends the XML data to the Java Servlet successfully; however, the user has to choose "Allow blocked content" for the form to appear.

On Google Chrome, the user can fill out the form, and hitting the "submit form" button sends a POST request to the Java servlet, but the body of the POST request is empty.

On Microsoft Edge, the form loads in, but the fields and "submit form" button are not interactive, they're just text.

On Firefox, the .pdf form doesn't load in at all.

Sending the form in Adobe Acrobat itself sends the XML data successfully, like Internet Explorer.

I've also tried using Google's Embeddable document viewer as seen here:[Embeddable Google Document Viewer​​], and that embed works on all of the browsers I tested, but the embedded PDF was not interactive on any browser, so that's no good.

Any ideas how I can properly embed the .PDF forms so that they are usable on all, or most, browsers? Or am I out of luck?

Thanks,

Brian

This topic has been closed for replies.

1 reply

Bernd Alheit
Community Expert
Community Expert
June 26, 2017

Use HTML forms when you want support this browsers.

Participant
June 26, 2017

HTML Forms aren't really an option unfortunately; what I'm trying to do would allow users to fill out existing (paper) forms on the web page, and so unless I have a way to intelligently and correctly layer the HTML field objects over the blank template of the form in the appropriate places, without being messed up by different resolutions/browsers/etc. it won't handle the functionality I'm trying to achieve.