Digit group symbol is changed from comma to dot in output PDF using .NET

I have upgraded Aspose.Words to 19.12 but this issue is not resolved yet.

@freydoonk

Please use the latest version of Aspose.Words for .NET 20.6. If you still face problem, please ZIP and attach your input and problematic output documents here for testing. We will investigate this issue and provide you more information on it.

I tested it with Aspose.Words for .NET 20.6 and the problem exists yet.
I have attached the test document and used font on it.

Temp.zip (69.2 KB)

@freydoonk

We have tested the scenario using the latest version of Aspose.Words for .NET 20.6 and have not found the shared issue. Please check the attached output PDF. 20.6.pdf (4.5 KB)

We have used the following code example to generate the PDF.

Document document = new Document(MyDir + "test.docx");
PdfSaveOptions options = new PdfSaveOptions();
options.NumeralFormat = NumeralFormat.Context;
document.Save(MyDir +@"20.6.pdf", options);

Hi, in the attached image you can see what is the difference between the PDF which is created by MsWord and ones that is created by Aspose. The commas are changed to dots in the latter.

Sample.png (20.9 KB)

@freydoonk

The number is separated by dot (.) instead of comma under English culture

Please provide information about your specific culture, such as the name of the culture, language and country/region. We will investigate the issue and provide you more information on it.

I use fa-ir as language code. I attached a screenshot of my computer region settings.
Based on this Wikipedia link, the fa-ir culture use decimal comma as Decimal separator.
Region Settings.jpg (62.5 KB)

@freydoonk

We have logged this problem in our issue tracking system as WORDSNET-20738 . You will be notified via this forum thread once this issue is resolved.

We apologize for your inconvenience.

@freydoonk

It is to inform you that the issue which you are facing is actually not a bug in Aspose.Words. So, we have closed this issue (WORDSNET-20738) as ‘Not a Bug’. Please note that Aspose.Words mimics the behavior of MS Word. If we change the setting of system using following steps, MS Word still shows the dot (.) between numbers.

  1. Changing the region to Iran
  2. Changing the regional format to Persian (Iran)
  3. Changing preferred editing language in Word to Persian (Iran)
  4. Changing the Numeral option under Options->Advanced->Show document content to Hindi/Context/System
  5. Installed the B Nazanin font the customer provided

Please check the attached image for our system setting. Settings.png (363.4 KB)

@tahir.manzoor
If the Aspose.Words mimics the behaviour of MS Word, the dot must be rendered as comma in the final pdf, because the PDF file which created by MS Word use comma instead of dot (like the attached file).
In my local computer, the Regional & languages are set to English (United States) and as you see the created PDF file with this settings uses comma.

Sample.zip (223.0 KB)

I try to force Aspose to use en-US CultureInfo by bellow code but it does not work yet.

Thread.CurrentThread.CurrentCulture = new CultureInfo("en-US");
Thread.CurrentThread.CurrentCulture.NumberFormat.NumberGroupSeparator = ",";
Document document = new Document(MyDir + "test.docx");
PdfSaveOptions options = new PdfSaveOptions();
options.NumeralFormat = NumeralFormat.Context;
document.Save(MyDir +@"20.6.pdf", options);

@freydoonk

We have logged this detail in our issue tracking system. We will inform you via this forum thread once there is an update available on it.

@freydoonk

You are using MS Word 2013. You encountered a behaviour that has been changed in later versions of MS Word. Since Aspose.Words and MS Word 2019 produce the same output, so we have closed this issue (WORDSNET-20738) as ‘Not a Bug’.