PDF Generating Tool Support Forum

HOME   Login   Register    Search




  Subject: can't load java:fonts from webapp
   PostPosted: 24 Nov 2020, 12:38 
I'm trying load fonts from jar, as explained on example. It is tomcat webapp.

Code:
pd4ml.useTTF("java:fonts/");

or
Code:
pd4ml.useTTF("java:fonts");


And pd4ml can't find resource.

Just look internally, how resource is checked on pd4ml and found

Code:
Thread.currentThread().getContextClassLoader().getResource("fonts");


I'm try to load this resource straight forward
Code:
URL contextClassLoader = Thread.currentThread().getContextClassLoader().getResource("fonts");
file:/Users/valenpo/Developer/archiva/archiva3/target/archiva-6.0.1/WEB-INF/lib/fonts-1.jar!/fonts/


and resource exist. Next line with pd4ml
Code:
pd4ml.useTTF("java:fonts");

resource doesn't exist.

Any clue?



[Reply]     [ 1 post ] 

Copyright ©2004-10 zefer|org. All rights reserved. Bookmark and Share