I have a customer document containing a merge field which results in multiple fonts used after filling.
I’ve managed to narrow the template down to a single mergefield and found out this behaviour was introduced in 16.4.0.
Example snippet (java):
Document doc = Document('template.docx');
FieldMergeField field = doc.selectNodes("//FieldStart").toArray()[0].field;
field.setResult('Lorem ipsum dolor sit amet');
doc.save('result.docx');
The words Lorem ipsum now use the Arial
font, the words dolor sit amet use Times New Roman
.
Before 16.4.0 all the words use the font Arial
as expected.
See attached template and result before and after 16.4
This issue still exists in the latest version 17.7
mergefield-font.zip (32.5 KB)