PDF Generation from DOCX Template Fails to Render Greek Fonts

Dear Jmix Support Team,

I’m experiencing an issue with the Reports Add-on when generating a PDF from a DOCX template containing Greek characters.

Environment: Jmix 2.6.0, Java 21, Image built with bootBuildImage (Gradle)

Problem

Although generating DOCX output from a DOCX template works fine (Greek characters display correctly), generating PDF output from the same DOCX template results in all Greek characters being replaced by #.

So far, I have tried to configure fonts using jmix.reports.pdf-fonts-directory=/workspace/BOOT-INF/classes/msttcorefonts, where the fonts were placed inside the src/main/resources/msttcorefonts directory.

image

I also tried placing the same fonts under .jmix/conf/jmix/fonts, but it had no effect.

As you can see below, it looks like the fonts are retrieved successfully when I use jmix.reports.pdf-fonts-directory in HTML to PDF conversion.

Screenshots and Logs

The DOCX template I used with Liberation Serif fonts:

image

DOCX → DOCX

Generating DOCX output with this template (for enName=Michael and grName=Μιχάλης) works correctly:

Screenshot from 2025-08-18 13-47-18

Logs:
logs_docx_to_docx_transformation.log (4.4 KB)

DOCX → PDF

Generating PDF output from the same template results in missing Greek characters:

Screenshot from 2025-08-18 13-48-34

As you can see below, the DOCX → PDF logs show warnings such as:

Font "Liberation Serif,normal,400" not found. Substituting with "any,normal,400".

and

Document font Liberation Serif is not mapped to a physical font!
No fonts configured!

Logs:
logs_docx_to_pdf_transformation.log (13.2 KB)

HTML → PDF

If I convert an HTML template with the same Liberation Serif font, PDF generation works correctly:

The html file I used: testReport20250818_html.html (1.3 KB)

The outcome:

image

According to the logs, the font family has been successfully read from the location specified with jmix.reports.pdf-fonts-directory:

025-08-18T13:52:42.877+03:00  INFO 1 --- [io-8080-exec-22] o.a.fop.fonts.apps.AbstractFontReader    : Reading /workspace/BOOT-INF/classes/msttcorefonts/Liberation_Serif_Regular.ttf...
2025-08-18T13:52:42.929+03:00  INFO 1 --- [io-8080-exec-22] o.a.fop.fonts.apps.AbstractFontReader    : Font Family: [Liberation Serif]

Logs:
logs_html_to_pdf_transformation.log (713 Bytes)

Could you please advise how to properly configure DOCX-to-PDF font handling so Greek characters render correctly?

Here is the build.gradle of my project:
build.gradle (3.2 KB)

Best regards,
Michalis