Skip to content

Problem when integrating an SVG image #715

Answered by Lucas-C
Leopold194 asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @Leopold194!

If you open this file with a text editor, you will see thi one the line 14:

fill="url(#paint0_linear_137_38)

This is a reference to the def on line 3:

<linearGradient id="paint0_linear_137_38" x1="0" y1="46.63" x2="595.28" y2="46.63" gradientUnits="userSpaceOnUse">

url() as fill values are part of the SVG feature that fpdf2 currently does not support:

Currently, the best I can suggest is either:

  • replace url(#paint0_linear_137_38) by #56B35D in your SVG source image, and fpdf2 will be able to insert it, but you will loose the gradient effect.
  • contribute to fpdf2 and add support …

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@Leopold194
Comment options

Answer selected by Leopold194
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
2 participants