You got some answer on how to map PDF to HTML and convert to HTML. So, the remaining issue is to make this HTML editable and convert it back to PDF, eventually.
Fortunately, this problem is easier to solve. First of all, if you add the attribute
contecteditable
to some HTML element, it will become editable as in some primitive HTML editor. Please see:
http://www.w3schools.com/tags/att_global_contenteditable.asp[
^].
In many cases, it would be enough. The only problem is: you will be able to edit existing text using the current HTML formatting, not change the formatting in an arbitrary way. Naturally, you would need to add some formatting controls, to make a decent editor. You can use one of the available editors. I would recommend, for example, this one:
http://en.wikipedia.org/wiki/TinyMCE[
^],
http://www.tinymce.com/[
^].
Alternatively, you can examine the code to see how it works and implement something on your own. You can try to find something else, if you want. First of all, you can check this list and comparison table:
http://en.wikipedia.org/wiki/List_of_HTML_editors[
^],
http://en.wikipedia.org/wiki/Comparison_of_HTML_editors[
^].
Good luck.
—SA