B4J Library B4JServer QRCode Generator

QRCode Generator using ZXing Library
Can be use for B4JServer, Web API Server and Non-UI app (does not depend on XUI or jFX)

1677008555223.png


B4X:
Dim img As String = File.Combine(Main.AssetFolder, "img")
Dim generate As ZXing
generate.Initialize
generate.QrCode(value, 400, File.Combine(img, "image.png"), "png")

Additional Libraries:
core-3.5.1.jar
javase-3.5.1.jar
jZXing.jar (attached)



jZXing
Author:
Aeric Poon
Version: 1.00
 

Attachments

  • jZXing.zip
    3 KB · Views: 281
  • QRCodeServer.zip
    1.8 KB · Views: 235
Last edited:

aeric

Expert
Licensed User
Longtime User
I just found there is a similar library (which is more faster since it is based on nayuki)
 

hatzisn

Expert
Licensed User
Longtime User
I just found there is a similar library (which is more faster since it is based on nayuki)

Nevertheless your perseverence in your project worked for all of us. Congratulations.
 
Last edited:

hatzisn

Expert
Licensed User
Longtime User

sfsameer

Well-Known Member
Licensed User
Longtime User
Hello,

Great library! , but i would recommend using the client side QR Code creations :

HTML:
<div id="qrresult"></div>
<script src="https://cdn.jsdelivr.net/gh/davidshimjs/qrcodejs/qrcode.min.js"></script>

JServer:
Dim strQR As String
    strQR = $"const qrcode = new QRCode(document.getElementById('qrresult'), {
  text: '${strShortURL}',
  width: 120,
  height: 120,
  colorDark : '#000',
  colorLight : '#fff',
  correctLevel : QRCode.CorrectLevel.H
});"$
    
        ws.Eval(strQR,Null)
        ws.Flush

*You can replace the strShortURL with a URL or text.
 
Top