ODT field population loses font information

Using Aspose Words for Java 22.8 and 23.1, font information is lost in fields where an ODT document is saved after populating fields.

This is demonstrated by the attached zip. This contains:

  • ODT Merge Test - original.odt - the source document
  • ODT Merge Test 1.pdf - the source document merged and then exported to PDF. This document looks correct
  • ODT Merge Test 2.odt - the source document merged and then saved as an ODT. This is incorrect - the field font has changed to the font of the Default style, Times New Roman size 12, and the text is no longer bold
  • ODT Merge Test 3.pdf - the ODT Merge Test 2.odt document exported to PDF.
    Provided to compare with the expected result in ODT Merge Test 1.pdf

The following code was used:

Document document1 = new Document("ODT Merge Test - original.odt");
document1.getVariables().set("field", "field value, should be Arial bold size 9");
document1.updateFields();
document1.save("ODT Merge Test 1.pdf");

Document document2 = new Document("ODT Merge Test - original.odt");
document2.getVariables().set("field", "field value, should be Arial bold size 9");
document2.updateFields();
document2.save("ODT Merge Test 2.odt");

Document document3 = new Document("ODT Merge Test 2.odt");
document3.updateFields(); // needed otherwise fields don't appear in PDF
document3.save("ODT Merge Test 3.pdf");

ODT Merge Test.zip (85.3 KB)

@unb
We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.

Issue ID(s): WORDSNET-25014

You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.