When converting a Farsi document with Farsi numbering to pdf, the resulting pdf’s numbering is shows with European numbers, so I added the saveOptions to convert the numbers to Arabic format like so:
var saveOptions = new PdfSaveOptions();
saveOptions.NumeralFormat = NumeralFormat.EasternArabicIndic;
but because I have embeded objects, I have to set TextShaperFactory on LayoutOptions so the embeded object grid text is shown correctly. (see this topic : Embedded Excel Object in Word to pdf with Farsi words).
As the result of setting both saveOptions.NumeralFormat and LayoutOptions.TextShaperFactory, the resulting pdf’s numbering is turned European. If I remove the setting of LayoutOptions.TextShaperFactory, the numbering works fine and show the numbering on the pdf as Arabic numbers.
bellow is the complete code snippet I use to convert document to pdf:
var s = new Aspose.Words.Document(@"documentFile.docx");
s.LayoutOptions.TextShaperFactory = Aspose.Words.Shaping.HarfBuzz.HarfBuzzTextShaperFactory.Instance;
var saveOptions = new PdfSaveOptions();
saveOptions.NumeralFormat = NumeralFormat.EasternArabicIndic;
s.Save(@"pdfFile.pdf", saveOptions);
I also attached a test word document file to test with converting numebring.
New Microsoft Word Document.docx (14.7 KB)