Cavyn VonDeylen
Cavyn VonDeylen

Reputation: 4239

Retrieve PDF from iframe

Is it possible to retrieve a PDF from an iframe and submit it back to the server?

My use case is to display a PDF form to the user, and let them submit the form after filling it out. I haven't found anything indicating this is possible, but I'm remaining hopeful for the moment.

Upvotes: 3

Views: 887

Answers (1)

yms
yms

Reputation: 10418

You can add a submit button inside the PDF itself while generating it, and treat the data comming from your PDF form in the same way you would deal with an HTML form.

In order to achieve this, you will need to add a button annotation to your PDF form, and attach a "submit form" action to it. See Chapter 8 - Interactive Forms of the PDF Reference Document from Adobe for more details.

You can create then an asp.net page that processes the input from the PDF form. Note that the field names of a PDF form can be used in asp.net Request object to collect the data.

If you want to submit the whole file instead, you can do so by setting a flag in the "submit-form" action that you need to add to your PDF file, but I do not recommend doing this in general since it will consume more bandwidth from your server.

Upvotes: 3

Related Questions