danfickle / danfickle/openhtmltopdf
Base64 Code not rendering for huge Image
- Dominant language
- Java
- Stars
- 2.2k
- Forks
- 423
- PR merge metrics
- No merged PRs in 30d
Description
Hi,
I´m using the function to create a Base64 String:
`public static String convertToBase64(File file) throws IOException {
LOGGER.info("START convertToBase64");
InputStream finput = new FileInputStream(file);
byte[] imageBytes = new byte[(int) file.length()];
finput.read(imageBytes, 0, imageBytes.length);
finput.close();
String result = Base64.encodeBase64String(imageBytes);
LOGGER.info("END convertToBase64");
return result;
}`
If I have images which a bigger (4 MB) than OpenHTMLtoPDF is not rendering those images anymore.
For images which are not so big (1 MB) it´s working fine.
In the HTML page is rendering fine.
Any ideas?
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.