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 500 forks source link

Upgrade prawn-svg to 0.34.x #2504

Closed mojavelinux closed 7 months ago

mojavelinux commented 7 months ago

prawn-svg had a compatibility issue with Ruby 3.3 due to its use of the base64 library. When using Asciidoctor PDF with Ruby 3.3, users see the following warning:

gems/ruby/3.3.0/gems/prawn-svg-0.33.0/lib/prawn/svg/loaders/data.rb:1: warning: base64 was loaded from the standard library, but will no longer be part of the default gems since Ruby 3.4.0. Add base64 to your Gemfile or gemspec. Also contact author of prawn-svg-0.33.0 to add base64 into its gemspec.

This was fixed in prawn-svg 0.34.0 by adding an explicit dependency on the base64 gem. However, the dependency was too specific, so we couldn't upgrade to it. That problem was subsequently addressed by removing the dependency outright. The 0.34.0 release also brought with it support for SVG image references to SVG (SVG in SVG). However, it broke gradients that have no name. Both of those fixes landed in 0.34.1. However, that release broke the rendering of certain symbols referenced by the use element. However, we're able to apply at patch for that issue in Asciidoctor PDF.

With that said, there's now a path to upgrading prawn-svg to 0.34.x, which, first and foremost, will address the aforementioned warning. Users will also be able to use SVG in SVG, which has been a long-awaited capability.

mojavelinux commented 7 months ago

resolved by 02261a1eab0d1b8f1d49ca17dd1a8be7c980390a