Closed Daya2006 closed 4 years ago
Gettin null pointer exception:
final InputStream resourceAsStream = this.getClass() .getClassLoader() .getResourceAsStream("proxima_nova_reg-webfont.ttf");
ownFont = PDType0Font.load(doc, resourceAsStream);
in the above(ownFont = PDType0Font.load(doc, resourceAsStream); ) , the file is present in the location.
java.lang.NullPointerException
at org.apache.fontbox.ttf.MemoryTTFDataStream.
worked fine after i did ownFont = PDType0Font.load(doc, new File("proxima_nova_reg-webfont.ttf"));
is there a way i can use a ttf file for a font to use a font other than the default ones? need to use proxima nova