-
Notifications
You must be signed in to change notification settings - Fork 364
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Problem when load a font #425
Comments
hi @fabioebner , are you sure that Quite sure this is the issue :). |
hi @syjer my log:
|
@fabioebner are you building your project with maven? If you have put your fonts in the |
Generally, resources will be files while building with an IDE but not in the final jar. Better to use input streams. Also:
|
Assumed solved, please reopen as required. |
I create one project that convert a HTML to PDF/A then I deploy that project in a repository. :
`
public class PdfService {
}`
Then I use that component in a springboot application so when I call my comp with this code:
PdfService pdfService = new PdfService(new File("/Users/fabioebner/Projetos/java/springboot/notificato-api/src/main/resources/NotoSerif-Regular.ttf"),new File("/Users/fabioebner/Projetos/java/springboot/notificato-api/src/main/resources/sRGB.icc"));
works fine. but when I use the ResourceLoader to load the font and color (with this code)
PdfService pdfService = new PdfService(resourceLoader.getResource("classpath:NotoSerif-Regular.ttf").getFile(),resourceLoader.getResource("classpath:sRGB.icc").getFile());
he can't find read the font..
anyone knwo why?
tks
the message:
The text was updated successfully, but these errors were encountered: