-
Notifications
You must be signed in to change notification settings - Fork 501
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
SVG images fail to convert linear gradients #228
Comments
For reference, here's the correct link to the sample SVG: |
This looks like a potential incompatibility between the versions of prawn and prawn-svg that you are using. I'm not able to reproduce it yet. To help, could you give me the output of the following commands:
and
Also, keep in mind that these diagrams aren't going to look the way you expect (yet) in Asciidoctor PDF because prawn-svg does not support linear gradients. If there's a way you can disable linear gradients in the output of the UML tool, they are going to look a lot better once inserted. For the status on the linear gradient support, see mogest/prawn-svg#62 |
Sorry about the link - I changed the repo later in the day. I've fixed it in the original report above.
W.r.t. linear gradients I assume you mean the colour gradients? It would be good if colours of some kind are preserved, but gradients is no big deal. We probably can disable them in the tool. |
I see you are using asciidoctor-pdf 1.5.0.alpha.7. Could you try this with 1.5.0.alpha.8? We've upgraded both prawn and prawn-svg since 1.5.0.alpha.7, so this issue is very likely related to the use of these older gems (I recognize things are moving fast right now).
That is correct.
You get the underlying color, which is gray. Here's how it looks when I render it with the latest code. |
The dark appearance is a result of using prawn-svg 0.20.0. Unfortunately, prawn-svg 0.21.0 came out after the Asciidoctor PDF 1.5.0.alpha.8 release with a fix for this issue. You should be able to upgrade it explicitly and use it. Just type
and it should get you prawn-svg 0.21.0. The linear gradient feature is being worked so there's hope an even better solution is coming.
That's a scenario I didn't see until after the alpha.8 release. For now, you can set the |
I'm happy to report that support for linear gradients is making it's way through Prawn and Prawn SVG. We'll continue tracking that progress upstream. Note, however, that no changes are required in Asciidoctor PDF other than upgrading the version of Prawn and Prawn SVG once these features become available. |
I updated the title of this issue to focus on the linear gradient feature. Once that is available in Prawn SVG, we'll upgrade and this issue will be resolved. Follow the progress at mogest/prawn-svg#62. |
This is now resolved upstream!! You'll be able to use the feature in alpha.16. |
…s to be mapped in SVG - see mogest/prawn-svg#94 - also resolves asciidoctor#741; see mogest/prawn-svg#91 - also resolves asciidoctor#228; see mogest/prawn-svg#62
When I convert my document to using .svg images generated from a UML tool, I get this, for each one:
I know the SVGs are fine because they display normally in the HTML-generated output.
The only reference to the problem I could find is here, and this seems old-ish...
Here's one of the .svgs.
Any ideas?
The text was updated successfully, but these errors were encountered: