We have a similar problem with the font attributes missing from the tags since we upgraded to 22.7.0 from 17.x.x. The older version added the font attributes and our content renders correctly. Is there another option we should be using for converting docx to html?
@jamie_schaub_wyoleg_gov Could you please attach your input and output document here for testing? Also, please specify what font’s attributes are missed. We will check the issue and provide you more information.
AsposeFiles.zip (69.5 KB)
The missing attributes are the “font” types on the tags. Is there a setting that will keep these tags in the exported output?
@jamie_schaub_wyoleg_gov As I can see font attributes are exported to HTML properly. Since default font is used across the document, it is set in the body
element and is inherited by child elements:
<body style="font-family:'Courier New'; font-size:10pt">
The behavior is expected and correct to reduce the output document size.
The “body” tag is removed during processing in our application. This is the reason I’d like to keep the tags in the resulting output string.
Is that possible?
@jamie_schaub_wyoleg_gov Unfortunately, currently there is no way to write default font in each <span>
tag in output HTML produced by Aspose.Words. The default font is written once in the root <body>
tag.
Thank you for looking into this. It does make sense to consolidate all those tags into one attribute.