Closed JanvanCasteren closed 1 year ago
Update: I found my way around Java (I don't develop in Java normally) and I am debugging the thing now myself. I will come back on it later with my findings.
I found the issue.
The solution was in the guideline:
_PDF/UA prohibits the use of built-in fonts so make sure to provide a font and specify it for the body element and any page margin rules (eg. @top-center).
I missed that one!
When I try to use a font from file, as in this:
builder.useFont(new File("/path/to/any-font.ttf"), "my-regular");
I get the message 'Font list is empty'
com.openhtmltopdf.load INFO:: Loading font(my-regular) from PDFont supplier now.
com.openhtmltopdf.render WARNING:: Font list is empty.
I am sure the font file is at the given path. I can read and write it with java, eg with
the file at path/to/out.ttf can be displayed correctly with a font viewer
used openhtmltodpf version is 1.0.10