Page 1 of 1

Incorrect font-family when converting to PDF in pagenumber

PostPosted: Wed Jan 25, 2023 5:35 am
by mushen
Hello.
First of all, I want to thank you for the product. I'm new to docx4j, I'm having a problem converting docx to pdf. When numbering pages in the header, the font is changed. I set Times New Roman, but after the conversion the font changes, otherwise the font is correct.
This problem reproduces even with a new empty file.
I do the conversion using the Docx4J.toPDF method. Further, under the hood in Docx4J, toFO is already called

My dependencies:
Code: Select all
<dependency>
   <groupId>org.docx4j</groupId>
   <artifactId>docx4j-core</artifactId>
   <version>11.4.8</version>
</dependency>
<dependency>
   <groupId>org.docx4j</groupId>
   <artifactId>docx4j-JAXB-ReferenceImpl</artifactId>
   <version>11.4.8</version>
</dependency>
<dependency>
   <groupId>org.docx4j</groupId>
   <artifactId>docx4j-export-fo</artifactId>
   <version>11.4.8</version>
</dependency>
<dependency>
   <groupId>com.itextpdf</groupId>
   <artifactId>itextpdf</artifactId>
   <version>5.4.3</version>
</dependency>


I would appreciate any help.

Re: Incorrect font-family when converting to PDF in pagenumb

PostPosted: Sun Feb 05, 2023 10:19 am
by jason
What operating system? Is the font installed and detected?

What code are you using to invoke the converter? (Are you using BestMatchingMapper or IdentityPlusMapper)