We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Font name of Hebrew text is changed to 'Times New Roman' after re-saving DOCX using .NET

Hello,

I have a word document that contains Html altChunk (Anchor for Imported External Content).
The html consists of three lines of text.
Each line has different font, and also contains English and Hebrew words.
The document looks like this in Word:
image.png (5.1 KB)
When I open this document with Aspose.Words and then save it,
The font of the English words remains the same as expected, but the font of the Hebrew words changes to “Times New Roman”.
This is how the document looks like after opening and saving it with Aspose.Words:
image.png (7.7 KB)
All the fonts - Hebrew and English - exists on my computer.
When I copy the Html text and paste it directly into Word, then all fonts are fine.

This is the source word document:
source.zip (18.5 KB)
This is the code that opens the file and then saves it:

Aspose.Words.Document doc = new Aspose.Words.Document(“c:\temp\source.docx”);
doc.Save(“c:\temp\target.docx”);

This is the word document that is saved:
target.zip (12.9 KB)

I tested it with the lastest version of Apose.Words 21.1.

Can you please let me know if there is a fix or a workaround, so that the font of the Hebrew text will be preserved as well?

Thank you!

@aviaw

We have tested the scenario and have managed to reproduce the same issue at our side. For the sake of correction, we have logged this problem in our issue tracking system as WORDSNET-21707. You will be notified via this forum thread once this issue is resolved.

We apologize for your inconvenience.

The issues you have found earlier (filed as WORDSNET-21707) have been fixed in this Aspose.Words for .NET 21.6 update and this Aspose.Words for Java 21.6 update.