Spire.Doc is a professional Word .NET library specifically designed for developers to create, read, write, convert and print Word document files. Get free and professional technical support for Spire.Doc for .NET, Java, Android, C++, Python.

Fri Sep 08, 2023 10:57 pm

Hi there!

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:
numberingStyles.png



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!

Mehrbod_MK
 
Posts: 1
Joined: Fri Sep 08, 2023 10:42 pm

Mon Sep 11, 2023 5:44 am

Hi,

Thanks for your feedback.
We suggest that you use our latest commercial version for testing, which contains more hotfixes and new features. If the issue still exists after testing, please share us with your document. Thanks for your assistance.

Best regards,
Triste
E-iceblue support team
User avatar

Triste.Dai
 
Posts: 1000
Joined: Tue Nov 15, 2022 3:59 am

Return to Spire.Doc