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.
IDRsolutions develop a Java PDF library, a PDF forms to HTML5 converter, a PDF to HTML5 or SVG converter and a Java Image Library that doubles as an ImageIO replacement. On the blog our team post about anything interesting they learn about.