Quick question: Is it possible to replace a tag in a docx file with an HTML form, and then transform that docx to HTML containing a functional form?
Background:
Our users design/create their own docx files containing a variety of "tags" for addresses, phones, names, prices, etc. The tags are then replaced at runtime with appropriate data using replaceVariableByText and replaceTableVariable. After replacing the variables (tags) we add photos (if the user has included any) to the end of the document using addImage and then output a final docx file. We also use TransformDocAdvLibreOffice to generate a PDF and save that. This all works perfectly.
Next we are trying to add a signature feature that can be used by anyone, in any web browser. I thought it would be a simple matter to add some html-specific content (an HTML form contacting a canvas element) and then transform our finished docx file to HTML using TransformDocAdvHTML.
I tried using both replaceVariableByText and replaceVariableByHTML to insert the HTML form where the user needs it placed. Both of those options generate a lot of formatting around HTML tags so the form doesn't actually work.
Here is a simple example of the final result that I am trying to acheive. Look near the bottom of that page for a place you can draw your signature.
https://staging.workglue.net/COVID-19/Estimate-sample-2020.html
After many tests I'm not sure we can reliably and accurate reproduce any random docx file as HTML anyway. So, this may be a dead end, and we will have to try something completely different. But, I'm still curious about whether it's possible to use phpdocx to insert functional HTML into a docx file and then output HTML.
Any ideas appreciated.