I'm trying to save an asian-text based word document for automation purposes.
When I fill out the fields I desire and save the document as it is (.DOCX format), the numbering style is preserved.
However, when I save it under PDF format, with the help of ToPdfParameterList , it looses the numbering format, which means the digits are written in Latin, but they were supposed to be printed in Arabic script. (Persian fonts included.)
Here is the code I use:
- Code: Select all
ToPdfParameterList toPdfSettings = new ToPdfParameterList();
toPdfSettings.EmbeddedFontNameList = new List<string>() { "B Lotus" };
toPdfSettings.PrivateFontPaths = new List<PrivateFontPath>() {
new PrivateFontPath("B Lotus", "B Lotus_p30download.com.ttf"),
new PrivateFontPath("B Lotus", "B Lotus Bold_p30download.com.ttf"),
};
toPdfSettings.UsePSCoversion = true;
wordDocument_CertificateBase.SaveToFile("Some path...", toPdfSettings);
Here is the image comparing between the DOCX and PDF files. The numbering style is preserved in the DOCX file, but lost in PDF file:
IDE: Visual Studio 2022
Framework: Microsoft .NET Framework 6 (Long-Term support).
Library: FreeSpire.DOC Version 8.6.0
Operating System: Windows 10 22H2 x64
Thank you so much in advance!