ODT Generation Removes all HTML Except for Span

Maybe it is me. I cannot say.

Every time I generate an ODT document, from Proposals for example, HTML from form editor fields are:

  • Not displayed on the ODT generated file
  • Replaced by a line break on the ODT generated file

The only text that I can get to display on the ODT-generated file is plain text or text that is wrapped in span tags. Everything else does not get printed out to the ODT file, like:

  • ul
  • li
  • div
  • p

Hi,

Docgenerator uses PHP code to generate ODT. You may have to develop your own code for ODT to recognize html tags.

Please check : HTML to ODT to XML to PDF to …
or PHPWORD type of libraries and develop one for you.

thanks
yesbee

@RiseValInfotech
Thanks for your reply. I agree, I might have to look into something else for generating documents. I’m just glad I got to the point where I can generate ODTs with bold, italics, underlines, and bulleted lists.

It just seems to me that the only basic tags that get displayed are <text:span>. But <text:p> does not display anything. <text:p> is in there in the content.xml, but it’s not displaying the inner text on the ODT file.

Attached is the contents of the content.xml file: content.txt (3.9 KB)