Clippit
Clippit copied to clipboard
First tab in paragraph is ignorred
First tab in paragraph is ignorred during conversion OpenXml Word file into HTML by WmlToHtmlConverter.ConvertToHtml(). As result layout is corrupted and words are overlaped each other.
OpenXml:
<w:p w14:paraId="1ED11E10" w14:textId="54EA0B67" w:rsidR="008635E7" w:rsidRDefault="008F0094">
<w:r>
<w:t>BlaBlaBlaBlaBla</w:t>
</w:r>
<w:r>
<w:tab />
</w:r>
<w:r>
<w:t>Bla</w:t>
</w:r>
</w:p>
Result HTML:
<div>
<p dir="ltr" class="pt-Normal">
<span lang="en-GB" class="pt-DefaultParagraphFont">BlaBlaBlaBlaBla</span>
<span lang="en-GB" class="pt-DefaultParagraphFont-000000">Bla</span>
</p>
</div>
Can you please try tabWidth
attribute on the <w:tab>
https://github.com/sergey-tihon/Clippit/blob/master/OpenXmlPowerTools/WmlToHtmlConverter.cs#L469-L473
https://github.com/sergey-tihon/Clippit/blob/master/OpenXmlPowerTools/WmlToHtmlConverter.cs#L556-L559
I created that file directly in the Word application. But mentioned attribute (PtOpenXml.TabWidth) is custom PowerTool attribute which is created during file conversion (e.g. there https://github.com/sergey-tihon/Clippit/blob/master/OpenXmlPowerTools/WmlToHtmlConverter.cs#L1967-L1970).