py-pdf/fpdf2

`KeyError: '{http://www.w3.org/2000/svg}path'` when using an svg

Closed this issue · 4 comments

Describe the bug
I'm not able to use this svg that uses a element which should be supported by fpdf2:

result

Minimal code

from fpdf import FPDF

pdf = FPDF()

self.image('result.svg', x = 10, y = 8, w = 33)

Environment
Please provide the following information:

  • Operating System: Debian (ChromeOS)
  • Python version: 3.10
  • fpdf2 version used: 2.7.7

Hi @vadi2

Thank you for the bug report.

I was able to identify & fix this bug in this PR: #1077

The fix has been merged into the master branch of this repo, but not released yet.

You can install this unreleased latest version this way, if you want to test that this fix solves your initial problem:

pip install git+https://github.com/py-pdf/fpdf2.git@master

Brilliant, thanks a lot! I'll try it out.

The fix worked. Thank you!