Best QR Code Generator for Web Apps?

I’m setting out on a new project, need to generate QR codes within a WebApp. Is there a 2025 ‘best’ Plug-In for Barcode and QR Code generation in WebApps?

seems the barcode class can create a qr code via image method
https://documentation.xojo.com/api/hardware/barcode.html#barcode-image

Var b As New Barcode

Var pic As Picture = b.Image("Hello", 320, 320, Barcode.Types.QR)

ImageViewer1.Image = pic

I had a user report the Barcode class failing on headless Linux servers.

The Xojo Code

var URI as String = toURI( user, service )
try
  #if TargetMacOS or TargetWindows or TargetDesktop then
    Return Barcode.Image( URI, width, height )
  #endif
catch e as RuntimeException
  Return nil
end try

The crash reported through stderr

Jul 26 08:04:40 demo demo42001[828]: Failed to load plugin libBarcode64.so:
Jul 26 08:04:40 demo demo42001[828]: libgtk-3.so.0: cannot open shared object file: No such file or directory

The time I told Xojo Staff about it

Would be interesting to know if this is still happening.

1 Like

I still offer GraffitiQRCode.

Hi @Tim_Parnell it sure looks like an issue when deploying to Xojo Cloud servers.

The moment I add this line Var pic As Picture = b.Image("Hello", 100, 100, Barcode.Types.QR) to my WebApp project, it causes it to immediately crash on the Xojo Servers :frowning:

Hi @Anthony_G_Cyphers , while I try to lean towards Xojo-native solutions wherever possible, this may be one of those cases where I simple can’t. I’ll be heading to your site shortly :slight_smile:

MBS Xojo Plugins can also do barcodes with the BarcodeGeneratorMBS class.

Always depends on what exactly you need.
Picture object, JPEG/PNG image or vector graphics, maybe in a PDF?
Colors? ECC Level? With squares or circles?

It’s a shared method call it like:

Var pic As Picture = Barcode.Image("Hello", 100, 100, Barcode.Types.QR)

The last time I tried, it wasn’t supported on Console or Web targets. I believe that’s the issue.

2 Likes

But the docs say:

Compatibility

Desktop, iOS and Android projects types on all supported operating systems.

And below the method states only android is not supported

But still can be that console (and web) is not supported.

But not Console or Web. If they were supported, they’d be listed.

2 Likes

Ah true

Hi Christian,
In this instance the project requires the following…
1.- WebApp, across all kinds of browsers.
2.- The user would complete a transaction and the app generates a label to be printed.
3.- The label would contain (2) QR codes, and some other data (Name, Account, etc.).
4.- The QR would be simple black (thermal label printer), square, and very plain.
5.- Label would be a ‘Picture’ in the WebApp, to be printed to users local (Dymo label) printer.

Our plugin runs on the server for the web app and could make a PDF or picture with the barcode.
No idea how you like to send it to the local printer on the client computer.

Or you use a HTMLWebViewer and show a barcode there. then print in the browser to the label printer?

qrcode.js

My goal would be to use the WebHTMLViewer and call it’s Print method. I’ve tested it with WebPicture data and this seems like a viable solution.

We are working at the moment on the Xojo Cloud issue, to make the Barcode generation compatible.

@Anthony_G_Cyphers already created a bug report (Thanks Anthony!), Issue #76088.

3 Likes

This should be fixed already in Xojo Cloud, can you guys give it a try?

2 Likes

Excellent! Is this coming for 2025R1 or did you do something on the server-side to workaround the lack of support that we won’t be able (or want) to do on our own servers?

Travis made a fix server-side, so Xojo versions supporting Barcode can be re-deployed again and they should work fine.

Edit: libgtk was missing, causing apps using Barcode to fail to start.