Wrong number format of chart values

Hi there,

we are using Aspose Words Java to generate Word and PDF files with several charts inside. The only way to get our preferred style of the tables is using docx templates and inserting the data with the linq engine.

Our problem is that we would like to get the numbers formatted like the german number format (1.500,00 instead of 1,500.00).

While doing locale test with OS language is german everything works fine. But if we generating the documents on our production server with default OS language in English the numbers inside the PDF files were formatted in English. The generation of the docx files works correctly.

These are the results and the template we use.

test.zip (72.8 KB)

Thanks for your efforts

Paul Bachmann

@B4chi,

I think, you can use Locale.setDefault(new Locale("German")); to specify German culture before building the report.

In case the problem still remains, please also create a standalone simple Java application (source code without compilation errors) that helps us to reproduce your current problem on our end, ZIP and attach it here for testing. Please do not include Aspose.Words JAR files in it to reduce the file size.

@awais.hafeez

Thanks for your fast reply.
Unfortunately, this option has not resolved our problem. Therefore I attach a sample projekt as zip file as recommended.
sample.zip (100.0 KB)

The zip archive includes the source code written in java and build with maven, so no dependency is included in the archive. I also add the generated documents in docx and pdf format, so that you can see that the error only occours in pdf format. Both documents are generated on Ubuntu 18.04 LTS with English language settings.
Running the project on a German Windows 10 machine generates exactly the wanted results.

Hope the sample project is useful.

Thanks for your help.

Paul Bachmann

@B4chi,

We have logged your problem in our issue tracking system. Your ticket number is WORDSNET-17886. We will further look into the details of this problem and will keep you updated on the status of the linked issue.

@awais.hafeez
I found a solution by using Locale.setDefault(Locale.GERMANY); instead of Locale.setDefault(new Locale("German"));.

Thank you for your fast help.

@B4chi,

It is great that you were able to resolve this issue on your end. Please let us know anytime you have any further queries.