asciidoctor / asciidoctor-pdf

:page_with_curl: Asciidoctor PDF: A native PDF converter for AsciiDoc based on Asciidoctor and Prawn, written entirely in Ruby.
https://docs.asciidoctor.org/pdf-converter/latest/
MIT License
1.14k stars 501 forks source link

SVG gradients render with incorrect coordinates #2416

Closed jwright6323 closed 1 year ago

jwright6323 commented 1 year ago

Gist: https://gist.github.com/jwright6323/666747665d920d6bc294959be24f6822

$ asciidoctor-pdf -v
Asciidoctor PDF 2.3.4 using Asciidoctor 2.0.18 [https://asciidoctor.org]
Runtime Environment (ruby 2.6.10p210 (2022-04-12 revision 67958) [universal.x86_64-darwin22]) (lc:UTF-8 fs:UTF-8 in:UTF-8 ex:UTF-8)

I have recently started to use Asciidoctor to automate the creation of technical specifications within my team. I am very happy with the productivity boost- thank you for your work on this!

I noticed that some SVG images with gradients are rendered incorrectly based on their location on the page. I am not familiar enough with the inner workings of asciidoctor-pdf or prawn-svg to know where the bug may be, but it seems related to mogest/prawn-svg#122. I've included a Gist above with the test case.

mojavelinux commented 1 year ago

You are correct that there are limitations in prawn-svg with regard to gradients. As this is a library that Asciidoctor PDF integrates with, there is nothing we can do here to improve the support. That change must occur in prawn-svg. If there is a new version of prawn-svg that expands its support for SVG features, you may request that Asciidoctor PDF upgrade to that version. Until then, it's an upstream issue.