I use XHTMLImporter to generate a Word file from an existing HTML. It works fine, except when I want to indent a whole paragraph.
The following example works correctly:
- Code: Select all
<div style="margin-left:15mm">
Text ...
</div>
It is generated following (document.xml):
- Code: Select all
. . .
<w:p>
<w:pPr>
<w:spacing w:after="0"/>
<w:ind w:left="851"/>
<w:jc w:val="left"/>
</w:pPr>
<w:r>
<w:rPr>
<w:b w:val="false"/>
<w:i w:val="false"/>
<w:color w:val="000000"/>
<w:sz w:val="20"/>
</w:rPr>
<w:t>Text ...</w:t>
</w:r>
</w:p>
. . .
The next example does not work properly:
- Code: Select all
<div style="margin-left:15mm">
<p>Text ...</p>
</div>
This time it is generated following (document.xml):
- Code: Select all
<w:p>
<w:pPr>
<w:spacing w:after="0"/>
<w:ind w:left="0"/>
<w:jc w:val="left"/>
</w:pPr>
<w:r>
<w:rPr>
<w:b w:val="false"/>
<w:i w:val="false"/>
<w:color w:val="000000"/>
<w:sz w:val="20"/>
</w:rPr>
<w:t>Text ...</w:t>
</w:r>
</w:p>
and the value of margin-left is lost.
Any help would be greatly appreciated, thanks!