danfickle/openhtmltopdf

eating exception in PdfRendererBuilder.useFont()

pwolfpwolf opened this issue · 1 comments

if you call:

PdfRendererBuilder builder = new PdfRendererBuilder();
builder.useFont( new File("not/the/correct/path/font.ttf", "font name");

It will silently fail, and you end up with a null pointer error exception when the font is used. I was debugging it and found where the exception happened but was not reported. I can't remember exactly where it was though.

Hi @pwolfpwolf,

@brundipub has just done some good work in this area, but you’re right, we should probably report the exception itself. I’ll do so once back on the main branch.