FieldDocProperty format is not persisted after PDF conversion

Hi,

When the Word document contains a field, whose type is FieldType.FieldDocProperty, we added the numeric format for the field, for example { DOCPROPERTY Words # “### ### ###.00” }.

In word document, it looks like “80.41”. But after PDF conversion, it looks like “8 583,00”. We are using field.Update() to update the field in the code.

@M-Files_Support Aspose.Words uses the value stored in the Words document property. It’s value might have no actualized value. You cause try calling Document.UpdateWordCount() method to force Aspose.Words to update words count in the document.
If the problem still persist, please attach the problematic document here for testing.

Yea, we actually have the problem with embedded properties. I was trying to use Words as an example. The problem is the format “### ### ###.00” was not applied in PDF.

This is what I meant.
Word:

PDF:

@M-Files_Support Number format depends on the culture used by the current thread. For example in this case Japanese culture will be used:

CultureInfo culture = Thread.CurrentThread.CurrentCulture;
Thread.CurrentThread.CurrentCulture = new CultureInfo("ja-JP");

Document doc = new Document(@"C:\Temp\in.docx");
doc.UpdateFields();
doc.Save(@"C:\Temp\out.pdf");

Thread.CurrentThread.CurrentCulture = culture;

Also, you can specify FieldOptions.FieldUpdateCultureSource property to FieldUpdateCultureSource.FieldCode. In this case Aspose.Words will use culture applied to the field code while formatting field value.

Thank you!
So is it possible to apply a numeric format for a specific customized DOCPROPERTY, for example in the same document I have { DOCPROPERTY "MFiles_PGCDD123456789" \# "### ### ###.00" } and { DOCPROPERTY "MFiles_PGCDD123456789" \# "### ### ###,00" }?

In docx, I don’t have to define the culture to be Japaness.

@M-Files_Support Yes, by default Aspose.Words uses culture of the current thread upon formatting field values.