pythonwindowssvgcairo

Convert SVG to PNG with Python on Windows


Question: Which reproducible process can enable Windows Python users to render a SVG image into PNG?


Many questions/answers (such as Convert SVG to PNG in Python and Server-side SVG to PNG (or some other image format) in python, which are not duplicates for the reasons explained below) explain how to convert a SVG to PNG with Python.

Unfortunately, none of them are ready-to-use for Python + Windows. After more than 20 minutes, and many different attempts, I'm still unable to do it. More details about failing attempts:

So a solution - specific for Windows - would be helpful.


Solution

  • From the comments, the solution was to install svglib version 1.0.1 and reportlab 3.5.59.