OkapiBarcode icon indicating copy to clipboard operation
OkapiBarcode copied to clipboard

Swiss QR Code

Open SSchroederInfor opened this issue 3 years ago • 1 comments

Hi, is there a plan to support creating Swiss QR Code in the near future? (The Swiss banks placed new invoice forms with QR Code which contains invoice details. In the center of the QR Code the Swiss flag should be displayed. Example: https://www.six-group.com/en/newsroom/media-releases/2020/20200609-qr-bill-launch.html)

Thanks for any answer

SSchroederInfor avatar Sep 02 '22 16:09 SSchroederInfor

It looks like the spec is here: https://www.paymentstandards.ch/dam/downloads/ig-qr-bill-en.pdf

This isn't on our immediate radar, but I'm happy to review a PR. It would probably be a separate Symbol subclass, which internally delegates most of the work to the existing QrCode class.

gredler avatar Sep 04 '22 19:09 gredler

Nice change!

Minor input: the name SwissQrBillCode would probably be a bit more explicit since this QR code is only used for bills, also the spec says this. For the tests, it would probably make sense to use real world content, which consists of multiple lines. You could create valid content for example here: https://www.codecrete.net/qrbill/

uwolfer avatar Feb 26 '24 20:02 uwolfer

@uwolfer Thanks for the pointer, the sample actually uncovered an encoding bug!

gredler avatar Feb 26 '24 23:02 gredler

@uwolfer I forgot to mention, regarding the naming: "Swiss QR Code" is what the spec calls it, and it's already a bit of a longer name, so I think I'll leave that part as is for now.

gredler avatar Feb 26 '24 23:02 gredler