CairoSVG icon indicating copy to clipboard operation
CairoSVG copied to clipboard

CAIRO_STATUS_WIN32_GDI_ERROR

Open o-sapov opened this issue 2 years ago • 1 comments

On windows 10, python 3.8 I'm getting:

cairocffi.CairoError: cairo returned CAIRO_STATUS_WIN32_GDI_ERROR: b'error occurred in the Windows Graphics Device Interface'

When applying:

cairosvg.svg2pdf(
    url="file.svg", write_to="file.png")

Same on the command line.

cairosvg 2.6.0 pyhd8ed1ab_0 conda-forge

o-sapov avatar Jan 31 '23 09:01 o-sapov

Hi!

Maybe there’s a problem with the fonts installed on your system. Is your setup a fresh Windows, or is it the computer you use for your daily work, or maybe a virtual machine?

If you could try the same code on another computer, or if you could try another (simple) SVG file, it would be helpful to find where the problem comes from.

liZe avatar Jan 31 '23 13:01 liZe

It’s probably a bug in Cairo: https://gitlab.freedesktop.org/cairo/cairo/-/issues/530

liZe avatar Mar 18 '24 14:03 liZe