Thursday, 22 August 2013

Load files from resource beans?

Load files from resource beans?

I want to load some fonts and use them with Itext.
I saved the font in the /resources/font/ folder. I tried to load them this
was
BaseFont verdana_bf = BaseFont.createFont("../resources/font/Calibri.ttf",
BaseFont.IDENTITY_H, BaseFont.EMBEDDED);
but it does not work, I get following error:
java.io.IOException: ../resources/font/Calibri.ttf not found as file or
resource.
How can I load fonts, images from the resource folder in my beans? I need
to load some images aswell.

No comments:

Post a Comment