I am currently creating pdfs with images using pdfbox in a vaadin application. I am wondering how I could use the same images path in pdfbox that is used by the vaadin theme.
Right now I'm still using a .properties file to point to an images-folder, but I'd prefer if I could just put the images in the theme folder. That way I could easily add images to the folder and have them in git. This automation would save me trouble of making sure the .properties file and images are working on different machines.
The best solution I found so far is using Application.class.getResource("/images").toString(); What I dont like about that is that it returns it in the format of "file:". I could just remove the "file:"-part, but I was wondering if theres a better solution for this?