You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
first of all thanks for this great project.
I would like to embed SVG images into my Pdf. As mentioned in #75 SVG images can be embedded as Base64 data URL.
Rendering the SVG in the browser gives me the following result:
But the generated Pdf looks like:
So the embedded CSS styles have not been rendered.
I am using WeasyPrint 51, version 50 showed the same result.
Using CairoSvg with the same SVG and embedded style shows correct results.
Any suggestions to get SVG with CSS working?
Best regards
Peter
The text was updated successfully, but these errors were encountered:
Your SVG file has to include the SVG namespace in its svg tag: <svg width="500" height="300" xmlns="http://www.w3.org/2000/svg">. Adding the namespace solves your problem 😉.
(For the record: Firefox, Chrome and Safari refuse to render an SVG file without the namespace.)
Hello,
first of all thanks for this great project.
I would like to embed SVG images into my Pdf. As mentioned in #75 SVG images can be embedded as Base64 data URL.
I tried to render the following Html + Svg:
And replaced the
svg
node by animage
tag with the base64 encoded SVG:Rendering the SVG in the browser gives me the following result:
But the generated Pdf looks like:
So the embedded CSS styles have not been rendered.
I am using WeasyPrint 51, version 50 showed the same result.
Using CairoSvg with the same SVG and embedded style shows correct results.
Any suggestions to get SVG with CSS working?
Best regards
Peter
The text was updated successfully, but these errors were encountered: