Persian Numbers Are Changed To English Numbers After Conversion Docx to PDF

I have a MS.Word document in which I use persian numbers. Our application convert this MS.Word document (A) to MS.Word document (B) by Aspose.Words for Java API and then this new MS.Word document (B) is converted to a PDF file©. In this case my persian numbers are changed to english numbers that is not correct.
I will attache A,B and C files for you.
Regards

1 Like

Hi there,

Thanks for your inquiry. Please set the value of PdfSaveOptions.NumeralFormat property as CONTEXT to get the required output. Hope this helps you. This property gets or sets NumeralFormat used for rendering of numerals. European numerals are used by default.

Document doc = new Document(MyDir + "in.doc");
PdfSaveOptions saveOptions = new PdfSaveOptions();
saveOptions.setNumeralFormat(NumeralFormat.CONTEXT);
doc.save(MyDir + "Out.pdf", saveOptions);
1 Like