Skip to content
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

base64 images not loaded #975

Open
fabioportieri opened this issue Jul 18, 2024 · 0 comments
Open

base64 images not loaded #975

fabioportieri opened this issue Jul 18, 2024 · 0 comments

Comments

@fabioportieri
Copy link

fabioportieri commented Jul 18, 2024

Hello
i'm experiencing trouble when trying to render into pdf any base64 image
i tried several, even in the online sandbox page (https://sandbox.openhtmltopdf.com/), posting the code:

<html>
<head>
<style>

</style>
</head>
<body dir="auto">

<div style="text-align: center;">
  <img alt="" src="data:image/png;base64,iVBORw0KGgoAAA
ANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4
//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU
5ErkJggg==" style="width:36pt;height:36pt" ></img>
</div>

<div style="text-align:center;font-size: 90px;color:orange;">
  Hello World!
</div>

</body>
</html>

nothing get rendered, here the logs:

SAX XMLReader in use (parser): com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser
Loaded document in ~0ms
TIME: parse stylesheets 0ms
media = print
Matcher created with 160 selectors
Hit key(font-metrics:handwriting:400:normal) from cache.
Hit key(font-metrics:arabic:400:normal) from cache.
Hit key(font-metrics:deja-sans:400:normal) from cache.
Hit key(font-metrics:cjk:400:normal) from cache.
URI resolver rejected loading image at (data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU5ErkJggg==)
URI resolver rejected loading image at (data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU5ErkJggg==)
Using fast-mode renderer. Prepare to fly.

Isn't that supposed to work?

p.s. i read from another issue that it isn't supposed to work on the sandbox, problem is is not working on our java app neither, is there any additional configuration to do ?

Thank you for any assistance

@fabioportieri fabioportieri changed the title base64 images not loaded (tested with online sandbox) base64 images not loaded Jul 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant