Re: Font Size in HTML not Reflected and Zoom Level

Hi Awais,


I am trying to generate a word doc using this html string data
font size test 10
font size test 11
font size test 12
font size test 14
font size test 16
font size test 18
font size test 20
font size test 22

but the output docx file is showing different font sizes. For example 10px font is appearing 7.5px

The code I am using is given below

String html=//describe above
Document document = new Document(new ByteArrayInputStream(html.getBytes(Charset.forName(“UTF-8”))), loadOptions);

ByteArrayOutputStream stream = new ByteArrayOutputStream();
document.save(stream, SaveFormat.DOC);

I hope you will provide some solution for this

Thanks
Regards,
Muhammad Ali

Hi Ali,


Thanks for your inquiry. Well, Aspose.Words correctly mimics the way the Microsoft Word’s Html export engine works. To confirm this, please re-save your HTML document to DOC/DOCX format using Microsoft Word. However, for some reasons, the latest version of Aspose.Words (13.5.0) is unable to transform font-size: 11px to 8.5pt (as Microsoft Word does). Instead, it’s currently importing 11px as 8pt. I have logged this issue in our bug tracking system as WORDSNET-8388. Your thread has also been linked to this issue and you will be notified as soon as it is resolved. Sorry for the inconvenience.

Best regards,

The issues you have found earlier (filed as WORDSNET-8388) have been fixed in this .NET update and this Java update.


This message was posted using Notification2Forum from Downloads module by aspose.notifier.