claudep / swiss-qr-bill

A Python library to generate Swiss QR-bill payment slips
MIT License
98 stars 39 forks source link

bitmap image output #79

Closed eOperationsPN closed 2 years ago

eOperationsPN commented 2 years ago

is there any fix for the bitmap image output problem also described in https://groups.google.com/g/reportlab-users/c/8CTaC8Ss8dc?

I am also getting a lot of x_order_2: colinear! errors and a broken .png file with lots of horizontal lines when I try your example.

wsl2 / ubuntu 18.04 python 3.6.9 svglib 1.1.0 reportlab 3.6.8

Or did I miss something? Many thanks:)

claudep commented 2 years ago

Unfortunately, PNG output of standard Reportlab is known to be limited (read https://github.com/deeplook/svglib/issues/299#issuecomment-918111040). So either you can try changing the renderer used by Reportlab as suggested in that comment, or use a different tool that Reportlab if you want to generate PNG. I personnally only use Reportlab to generate PDF. Typically using Imagemagick's convert is generally good enough for a fair PNG output.

We may amend the README to explain this.

eOperationsPN commented 2 years ago

Thank you for your reply, this method works well for me.