danfickle / openhtmltopdf

An HTML to PDF library for the JVM. Based on Flying Saucer and Apache PDF-BOX 2. With SVG image support. Now also with accessible PDF support (WCAG, Section 508, PDF/UA)!
https://danfickle.github.io/pdf-templates/index.html
Other
1.93k stars 359 forks source link

Suggestion: Image not rendering inside JAR in container Docker #957

Open jcarlosvale opened 11 months ago

jcarlosvale commented 11 months ago

Hello, I spent some time to be able to generate a PDF using an image (in the resources) inside a JAR deployed in Docker. In the localhost it was OK but when the service was deployed the image was not working. Because it is necessary to have write permissions in the tmp folder. In our case is prohibitive to change the file permissions, so it was necessary to change the ImageIO to not use cache file. Change used: -> ImageIO.setUseCache(false);

As a suggestion: to allow in the PdfRendererBuilder change to use cache or not like the useFastMode( )