On exporting an interactive form to HTML the text-boxes checkboxes are not exported.
Copy link to clipboard
Copied
I want to convert an editable PDF form to HTML and for this I downloaded and installed the trial version of Adobe Acrobat Pro DC.
The PDF form is converted to HTML and it's format is intact but the HTML doesn't contain any input controls. The text-boxes, checkboxes, radio buttons and submit buttons are not present in the HTML, it just has the background image with borders for the input controls.
Is Acrobat Pro capable of exporting the editable PDF forms to HTML with proper input tags and buttons? What am I missing?
Any help is appreciated.
Copy link to clipboard
Copied
This is not possible with Adobe Acrobat.
Copy link to clipboard
Copied
Thanks Bernd for your quick response.
I've another question: Does Adobe Acrobat Pro has command line utility or API for converting PDF to HTML?
Copy link to clipboard
Copied
For the API look at the Acrobat SDK.
Copy link to clipboard
Copied
I checked the Acrobat DC SDK and unable to find any API for saving PDF to HTML.
Any pointer to the API method or which class to look into will be helpful.
Copy link to clipboard
Copied
In the JavaScript reference the saveAs method.
Copy link to clipboard
Copied
Thanks for the pointer Bernd... I'm able to save pdf as html using the JavaScript reference saveAs method.
For few sample PDFs it converts to HTML with proper formatting but for others the PDF formatting is lost in HTML, i.e., images and text are not properly aligned in HTML output.
You can view the sample PDF and its output at:
https://private.filesanywhere.com/Filesanywhere/fs/v.aspx?v=896b66885fa5b7ad72
Below is the VB.net code I'm using for conversion:
Dim srcDoc As Acrobat.CAcroPDDoc = CreateObject("AcroExch.PDDoc")
srcDoc.Open(sPDFPath)
Dim jsObj As Object = srcDoc.GetJSObject()
jsObj.saveAs(sHtmlPath, "com.adobe.acrobat.html")
Am I missing something? Is there any property or attribute of the JSObject to be set to get the perfect html output?
Copy link to clipboard
Copied
There is no such attribute or property.

