Commit Graph

15 Commits

Author SHA1 Message Date
Michael Stapelberg
fa23951802 gofmt 2022-08-14 13:36:26 +02:00
Benjamin Sugden
7197b263b2 Validate Ultimate Debtor (#7)
At least some swiss banking apps don't accept
ultimate deptor values longer than permitted.
2022-08-14 13:23:28 +02:00
Michael Stapelberg
05d1f60c14 make format=txt display the textual QR code contents
This allows for easy comparison with QR codes extracted from PDFs:

pdfimages -png invoice.pdf invoice && \
  zbarimg --raw invoice*.png > code.txt
2022-07-17 09:19:41 +02:00
Michael Stapelberg
014c819560 add PDF export 2020-11-22 22:50:06 +01:00
Michael Stapelberg
31bda30724 implement a native EPS writer 2020-11-14 11:49:49 +01:00
Michael Stapelberg
f39a23b8dc switch to own SVG of the Swiss cross
Compared to the Adobe Illustrator-exported version from SIX,
this version is defined on a 166px x 166px viewbox,
which are the recommended dimensions with which the cross
should be overlaid on top of QR codes.

This versions visually matches the PNG version from SIX
when rendered onto the same pixel size (166px x 166px).

But, this version scales better!
The SIX version does not render correctly.
My guess is that it might have to do with their
use of floating point coordinates.
2020-11-10 23:39:48 +01:00
Michael Stapelberg
dcd04602b0 add trailing \n for visual equality with https://www.qr-bill.online/ 2020-11-07 14:36:12 +01:00
Michael Stapelberg
c63152fc39 re-implement SVG version from scratch
This implementation is using the bit matrix returned by zxing,
and then we do our own SVG rendering.

The SIX-supplied Swiss Cross SVG version is now used for the overlay.

The resulting SVG has been successfully tested in a number of different SVG
rendering engines:

• Google Chrome 86
• Firefox 82
• Emacs 26
• GIMP
• Inkscape
• Mobile Safari

When rendering the SVG onto 1265x1265 px at 600 dpi,
the resulting image matches the PNG version exactly.
2020-11-07 14:36:12 +01:00
Michael Stapelberg
8a0bd604bd validation: remove invalid characters from message field 2020-09-10 10:17:26 +02:00
Michael Stapelberg
c090eb57c2 add craddrtype field, switch to structured by default for revolut
The revolut app does not seem to support the combined address type.

Luckily, switching to structured seems to not be a problem for
other apps such as the ZKB eBanking app.
2020-09-10 09:26:43 +02:00
Michael Stapelberg
041cd89d14 add boilerplate 2020-06-29 14:55:28 +02:00
Michael Stapelberg
2f17e21d55 overlay swiss cross in SVG, too 2020-06-29 14:46:00 +02:00
Michael Stapelberg
aceddb388b input validation (truncation mostly) 2020-06-29 14:45:41 +02:00
Michael Stapelberg
8bf9d10964 implement web handler for QR code generation 2020-06-29 14:45:30 +02:00
Michael Stapelberg
8410782ab8 initial commit 2020-06-29 14:45:14 +02:00