Word to PDF conversion with garbled characters

Dear guy
we got a document from client and try to convert it into PDF document from word by aspose.word component which version is 23.10 . there is one garbled char in the result pdf . the problem still exists even though we upgrade the version of aspose.word into 24.05 .

original.docx (30.0 KB)

byte[] datas = File.ReadAllBytes("d:\\original.docx");
var doc = new Aspose.Words.Document(new MemoryStream(datas));
var options = new Aspose.Words.Saving.PdfSaveOptions();
options.DownsampleOptions.Resolution = 200;
doc.LayoutOptions.RevisionOptions.ShowRevisionMarks = false;
doc.LayoutOptions.RevisionOptions.ShowRevisionBars = false;
doc.LayoutOptions.CommentDisplayMode = Aspose.Words.Layout.CommentDisplayMode.Hide;
doc.LayoutOptions.TextShaperFactory = Aspose.Words.Shaping.HarfBuzz.HarfBuzzTextShaperFactory.Instance;
MemoryStream output = new MemoryStream();
rlt = doc.Save(output, options);

image.png (7.8 KB)

@wengyeung The problematic character is ‘LATIN SUBSCRIPT SMALL LETTER N’ (U+2099). The glyph for this character is missing in “Arial” font and Font Fallback is performed. Both Aspose.Words and MS Word selects “Cambria Math” fallback font for this character. It seems that this font is not available to Aspose.Words on your side. For the same rendering as in MS Word, you should provide the “Cambria Math” to Aspose.Words. Or alternatively you could select a different fallback font and update fallback table accordingly. As an option Aspose.Wrods provides predefined fallback table for free Google Noto fonts.

how to handle the instruction above at my program code , can you give me an example ?

@wengyeung You could see an example code and fallback table in the article.

Dear guy
we encounter another problem while converting the chinese report as bellow attachment . please reference the snapshot from PDF output.

RSTS.docx (25.2 KB)

image.png (7.7 KB)

@wengyeung
We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.

Issue ID(s): WORDSNET-27270

You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.

@wengyeung We have rechecked the issue with the recently released 24.8 version of Aspose.Words and the problem is no longer reproducible.
out.pdf (52.0 KB)
So please try using the latest version and let us know if the problem still persists on your side.

The issues you have found earlier (filed as WORDSNET-27270) have been fixed in this Aspose.Words for .NET 24.9 update also available on NuGet.