Page 1 of 1

Convert out html loses superscript or subscript

PostPosted: Tue Jul 24, 2018 11:01 pm
by lbuer
Hey,

I used the sample ConvertOutHtml for converting a .docx file to html (at this point thanks for the great work, the conversion is pretty accurate).
However I noticed, that text in superscript or subscript is not converted. Maybe this is a bug or did I miss something here? Are there any other ways to get superscript/subscript shown correctly in the output html?

When digging deeper I found out, that org.docx4j.model.properties.run.VerticalAlignment uses
Code: Select all
vertical-align: top
vertical-align: bottom

to represent superscript/subscript. As far as I am concerned, this should be
Code: Select all
vertical-align: super
vertical-align: sub


When replacing these accordingly in the output html file, the text is shown correctly, so maybe this is the place to fix it?
Thanks for your help!

Re: Convert out html loses superscript or subscript

PostPosted: Tue Jul 31, 2018 1:24 am
by lbuer
Hey,
just wanted to push this again, can anybody please help me in this matter?

Thanks for your time!

Re: Convert out html loses superscript or subscript

PostPosted: Fri Aug 03, 2018 5:20 pm
by jason
https://github.com/plutext/docx4j/commi ... 33fe10fb85 will be in 6.0.1, due for release within the next 24 hours.

Re: Convert out html loses superscript or subscript

PostPosted: Fri Aug 03, 2018 6:19 pm
by lbuer
Awesome, thank you. Keep up the great work :D