I've attached a font (.ttf) file to a Java Script Library in Notes. This library is attached to a Java Agent. In that agent I can get an inputstream on the font file using this code:
InputStream is = this.getClass().getResourceAsStream("/SourceSansPro.otf");
That works as expected and I can embed the font in the PDF the Agent produces.
However, I want to do this work from inside a custom class that's inside the Script Library. But the above code doesn't work outside the "public class JavaAgent" class of the main Agent.
Anybody know why?
I've tried things like this.getClass().getDeclaringClass().getResource.... but to no avail.
Jake