plutext / docx4j-ImportXHTML

Converts XHTML to OpenXML WordML (docx) using docx4j
136 stars 125 forks source link

Hyperlink around image #83

Open plutext opened 2 years ago

plutext commented 2 years ago

Need to honour this.

https://github.com/plutext/docx4j-ImportXHTML/blob/master/src/main/java/org/docx4j/convert/in/xhtml/XHTMLImporterImpl.java#L1995

A hyperlinked image contains an a:hlinkClick element, for example:

        <w:drawing>
          <wp:inline distT="0" distB="0" distL="0" distR="0" wp14:anchorId="4FD4236C" wp14:editId="010E5646">
            <wp:docPr id="1" name="Picture 1" descr="Diagram&#xA;&#xA;Description automatically generated">
              <a:hlinkClick xmlns:a="http://schemas.openxmlformats.org/drawingml/2006/main" r:id="rId4"/>
            </wp:docPr>