Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Display PDF as HTML Form [closed]

Tags:

html

forms

pdf

I want display a PDF as an html page - where the user will be allowed to enter the fillable data. My problem is not how to import/fill data (I was able to do it using FDF/XML and ITextSharp). My only concern is how to show it to the user so that he/she can see the form, fill/edit data, and should be done with it.

I tried saving the PDF as an image file, and showing it as an background-image - but it was very crude! - Iam hoping that there should be some elegant solution.

Thanks for you help!

like image 864
Sekhar Avatar asked Nov 22 '10 15:11

Sekhar


People also ask

Why are my PDF forms not showing filled in form fields unless I click on them?

If the fillable fields in a PDF show as blank after getting filled in, the PDF will need to be printed to a new PDF to resolve this issue. This is typically caused when the PDF is filled using something other than Acrobat (i.e., a web browser or other PDF editing software).

How do I display a PDF in HTML?

The easiest way to put PDF in an HTML document is using the <a> tag with its href attribute. You need to add the URL or the reference link of your PDF file to the element.

Why is my PDF no longer fillable?

If you can't type into a form field on a pdf, it may be due to a browser's default viewer for pdfs. Fillable forms require Adobe Acrobat or Acrobat Reader/Acrobat DC to fill them out online or on your computer. Many browsers use a different pdf viewer by default that doesn't support fillable form fields.


2 Answers

PDF already has form-filling capabilities. Just display the PDF and let the user fill it in. You can add the fields using Adobe Acrobat. The form can be submitted back to your server like a Web page or just e-mailed.

like image 92
kindall Avatar answered Oct 09 '22 13:10

kindall


If you're using ASP.NET, you might consider this commercial PDF viewer option (which renders the PDF as HTML for you, preserving form fields)

like image 44
userx Avatar answered Oct 09 '22 12:10

userx