https://bugs.documentfoundation.org/show_bug.cgi?id=174409

            Bug ID: 174409
           Summary: Switch to Zint library for generating QR codes
           Product: LibreOffice
           Version: unspecified
          Hardware: All
                OS: All
            Status: UNCONFIRMED
          Keywords: difficultyInteresting, easyHack, skillCpp
          Severity: enhancement
          Priority: medium
         Component: LibreOffice
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected]
            Blocks: 127232

In 2021 we switched to using ZXing-Cpp for the QR code generation feature: bug
139778

However, in 2026 with version 3.0.0 ZXing-Cpp switched to using Zint for the
writing of QR codes:
https://sourceforge.net/projects/zint/
https://zint.org.uk/

The two projects collaborated for years before this release to make this
happen. Zint itself now uses ZXing-Cpp in their automated testing to decode QR
codes.

Using Zint via ZXing-Cpp now seems superfluous and has limitations - we lost
the ability to define a margin for the QR codes:
b659d76df983da7837634412d463c5b8b43d42b1
...even though Zint supports it through its border_width option.

Zint's API is explained in https://zint.org.uk/manual/chapter/5/

Here is an example of use from C++, with smart pointers to prevent leaks:
https://www.ccoderun.ca/programming/2023-11-05_zint/

How ZXing-Cpp does writing:
https://github.com/zxing-cpp/zxing-cpp#to-write-barcodes

Easy to find all the interesting files for the current implementation: `git
grep -in zxing`

If/when we switch to Zint, the licenses should be updated as well in
readlicense_oo/license/license.xml
The license for the Zint library is BSD:
https://sourceforge.net/p/zint/code/ci/master/tree/LICENSE (GPL only for
frontends and Qt backend)


Referenced Bugs:

https://bugs.documentfoundation.org/show_bug.cgi?id=127232
[Bug 127232] [META] QR/barcode generator's problems and enhancements
-- 
You are receiving this mail because:
You are the assignee for the bug.

Reply via email to