If you use our PDF2HTML5 convertor to create HTML forms and it will copy across the current values. But what if you want to collect the values from an HTML form?
The simplest solution is to use HTML5 to send the data back to the server. HTML forms allow you to post the data back to a URL. We added a mechanism to set this in your HTML pages in our ExtractPagesAsHTML example (or you can add it yourself).
/** * you can also customise some HTML tags, for example replacing <form> with your own custom code *///HTMLoutput.setTag(HTMLDisplay.FORM_TAG,"<form tag with your code in here>");
This allows you to setup a server process to listen for the results (which is beyond the scope of this article). If this process is in Java, you could then easily add the values back into the original PDF with a tool like IText.
Did you know...
IDRsolutions offers a whole range of online file converters to convert PDF and Microsoft Excel, Word and Office Documents to HTML5, SVG or image formats?
It is free to use for single file conversions and also includes Developer links if you want to use our commercial software for bulk conversions. Find out more on this page