-
Notifications
You must be signed in to change notification settings - Fork 57
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
SVG not rendering correct #143
Comments
Hi @SilentButeo2, can you please confirm it's a prawn-svg problem by running the svg directly through prawn-svg (see README file for three lines of how to do that), check the svg is only using v1.1 elements and that they're supported (there's a list in the README of supported and unsupported elements.) Happy to help if there's still a problem, let me know! |
The problem here is one that has come up many, many times. Mermaid does not generate portable SVGs. Instead, it embeds HTML into the SVG container as a foreign object. That is only going to work in a web browser. In order for an SVG library like prawn-svg to render an image, it needs to be a pure SVG. |
Ah, thanks again @mojavelinux! |
I'm using asciidoctor-pdf (1.60 on Win10) to convert .adoc files.
I have some issues to see some of the [mermaid] converted images.
In my setup, the [mermaid] text gets converted into a .svg file. And I presume it is that .svg that is send to prawn-svg to get converted.
This is the result I expect:
![svg](https://user-images.githubusercontent.com/14175250/137895305-2887ef91-81c5-4406-a6ae-29767b22e21f.png)
And this is the result in the PDF file:
![pdf](https://user-images.githubusercontent.com/14175250/137895306-598114d5-b024-4342-8e26-35710290d522.png)
Attached the .svg file
And the actual .adoc code:
Could be related to asciidoctor/asciidoctor-pdf#430 and #79
The text was updated successfully, but these errors were encountered: