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

Add support for inline svg data source in xml format in CSS #583

Open
vasilyevia opened this issue Oct 20, 2020 · 1 comment
Open

Add support for inline svg data source in xml format in CSS #583

vasilyevia opened this issue Oct 20, 2020 · 1 comment

Comments

@vasilyevia
Copy link

OpenHtmlToPdf lib supports base64 encoded inline svg data source (#485).

It would be great to also have support for inline xml data source in CSS like the following:
.some-class { background-image:url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="9" height="12" viewBox="0 0 9 12"><path fill="#5e6c75" d="M0.722,4.823L-0.01,4.1,4.134-.01,4.866,0.716Zm7.555,0L9.01,4.1,4.866-.01l-0.732.726ZM0.722,7.177L-0.01,7.9,4.134,12.01l0.732-.726Zm7.555,0L9.01,7.9,4.866,12.01l-0.732-.726Z"/></svg>'); }

@maneesh-echo
Copy link

.some-class {
background: url('resources/image.svg');
}

this also doesn't work and it gives the following warning
com.openhtmltopdf.load WARNING:: Unrecognized image format for: file

It would be great to also have this support.

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

2 participants