plutext / docx4j-ImportXHTML

Converts XHTML to OpenXML WordML (docx) using docx4j
135 stars 124 forks source link

SVG Images are not getting rendered in Docx while using XHTMLImportterImpl.convert() #100

Open Abhinandan578 opened 7 months ago

Abhinandan578 commented 7 months ago

I am creating tables in Docx using HTML Table. Table contains with SVG Base 64 image as Src. eg: <img src='data:image/svg+xml;base64,PHN2ZyB4bWx….>

While calling the XHTMLImportterImpl.convert() on the HTML Table string i am getting error -

[main] WARN org.docx4j.openpackaging.parts.WordprocessingML.BinaryPartAbstractImage - The file format is not supported. No ImagePreloader found for file:

Its working fine for PNG and JPEG Images. Can someone please help me here.

Artifact - docx4j-ImportXHTML Version - 11.4.8