Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

First tab in paragraph is ignorred #51

Open
evgeny-burmakov opened this issue Mar 21, 2022 · 2 comments
Open

First tab in paragraph is ignorred #51

evgeny-burmakov opened this issue Mar 21, 2022 · 2 comments
Labels
good first issue Good for newcomers help wanted Extra attention is needed Word Word related tasks

Comments

@evgeny-burmakov
Copy link

evgeny-burmakov commented Mar 21, 2022

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>

FirstTab.docx
FirstTab-html

@sergey-tihon sergey-tihon added help wanted Extra attention is needed good first issue Good for newcomers Word Word related tasks labels Mar 27, 2022
@evgeny-burmakov
Copy link
Author

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).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers help wanted Extra attention is needed Word Word related tasks
Projects
None yet
Development

No branches or pull requests

2 participants