QRCode Reader and QRCode Generator with Zxing

  • Ramón San Félix Ramón
  • Ramón San Félix Ramón's Avatar Code Author
  • Offline
More
2 years 9 months ago - 2 years 8 months ago #401 by Ramón San Félix Ramón
Ramón San Félix Ramón created the code: QRCode Reader and QRCode Generator with Zxing
I have been looking for a long time how to read and write barcodes in my PowerBuilder applications without having to resort to the Payment SDK's.
I had always heard of an Open Source library called Zxing but until now I had not been able to get it to work in PowerBuilder.
I have created a NetCore library that can be easily imported into PowerBuilder from version 2019 with the new .NET DLL Importer option.
The difference from other examples I have seen is that I incorporate the ability to read the generated barcodes.
For this example to work, you must have Net Core 3.1 installed. and have the SQL Server AdventureWorks sample database.

This example is developed with PowerBuilder 2021 Build 1311.

You can see a demo video at:


If you want to be aware of what I publish you can follow my blog:
rsrsystem.blogspot.com

This message has an attachment file.
Please log in or register to see it.

Last Edit: 2 years 8 months ago by Ramón San Félix Ramón.

Please Log in or Create an account to join the conversation.

  • Ramón San Félix Ramón
  • Ramón San Félix Ramón's Avatar Code Author
  • Offline
More
7 months 1 week ago #517 by Ramón San Félix Ramón
Ramón San Félix Ramón replied the code: QRCode Reader and QRCode Generator with Zxing
I'm glad it works for you.

I have recently updated my example to .Net6. You can download it at:

github.com/rasanfe/qrcode

And the c# project in:

github.com/rasanfe/ZxingBarcode

Please Log in or Create an account to join the conversation.

More
11 months 3 weeks ago #480 by Adolfo Chairez Gallegos
Adolfo Chairez Gallegos replied the code: QRCode Reader and QRCode Generator with Zxing
I managed to make it work at 64 bits, using SnapDevelop and PowerBuilder, although I had to use C# with Visual Studio 2019 because of a detail that SD is presenting, in fact I'm going to raise a ticket in Appeon for this situation.
Attachments:

Please Log in or Create an account to join the conversation.

  • Ramón San Félix Ramón
  • Ramón San Félix Ramón's Avatar Code Author
  • Offline
More
11 months 3 weeks ago #479 by Ramón San Félix Ramón
Ramón San Félix Ramón replied the code: QRCode Reader and QRCode Generator with Zxing
Hola Adolfo,
El ejemplo funciona en 32 y 64 Bits.
Saludos.

Please Log in or Create an account to join the conversation.

  • Ramón San Félix Ramón
  • Ramón San Félix Ramón's Avatar Code Author
  • Offline
More
11 months 3 weeks ago #478 by Ramón San Félix Ramón
Ramón San Félix Ramón replied the code: QRCode Reader and QRCode Generator with Zxing
Hola, Adolfo,
El ejemplo funciona en 32 y 64 Bits.
Saludos.

Please Log in or Create an account to join the conversation.

More
11 months 3 weeks ago #477 by Adolfo Chairez Gallegos
Adolfo Chairez Gallegos replied the code: QRCode Reader and QRCode Generator with Zxing
Hasta donde recuerdo este ejemplo no esta funcionando para 64 bits, o sí ?

Please Log in or Create an account to join the conversation.

  • Ramón San Félix Ramón
  • Ramón San Félix Ramón's Avatar Code Author
  • Offline
More
1 year 2 months ago #463 by Ramón San Félix Ramón
Ramón San Félix Ramón replied the code: QRCode Reader and QRCode Generator with Zxing
Hi Chris,
With this example it is not possible.
When I get back from my hollydays, I plan to post an example of this.
To read the pdf, you must first convert the PDF to an image. To do this, we must modify the .NET class of the example. You can use the GhostScript or Pdfium library to do the conversion and then with Zxing do the reading of the QR.
Regards,
Ramón.

Please Log in or Create an account to join the conversation.

More
1 year 2 months ago #462 by Christopher Craft
Christopher Craft replied the code: QRCode Reader and QRCode Generator with Zxing
Ramon,

Would this support reading the QR code within a PDF file?

Chris Craft

Please Log in or Create an account to join the conversation.

More
1 year 11 months ago #439 by Mario Francisco Celleri
Mario Francisco Celleri replied the code: QRCode Reader and QRCode Generator with Zxing
Thanks Ramón.

Please Log in or Create an account to join the conversation.

  • Ramón San Félix Ramón
  • Ramón San Félix Ramón's Avatar Code Author
  • Offline
More
1 year 11 months ago #438 by Ramón San Félix Ramón
Ramón San Félix Ramón replied the code: QRCode Reader and QRCode Generator with Zxing
Hello again.

I have been going around the example with EAN13 and this is what has come out.

I am attaching it as a zip file in case it helps.

It is in PowerBuilder2022 Build 1878.

Best Regards!.

This message has an attachment file.
Please log in or register to see it.

Please Log in or Create an account to join the conversation.

  • Ramón San Félix Ramón
  • Ramón San Félix Ramón's Avatar Code Author
  • Offline
More
1 year 11 months ago #437 by Ramón San Félix Ramón
Ramón San Félix Ramón replied the code: QRCode Reader and QRCode Generator with Zxing
Hi Mario,

I have tried the example with Ean13 and I don't like how it works. It seems that to generate the barcode you can only enter 12 characters without symbols or twelve characters plus the control digit. When reading the code, it adds the control digit to the right if you haven't put it.

I have tested the example with Code-39 and it works perfectly, and it is very similar to Ean13.

For this you have to make some changes in the example.

In the of_generar_qr function of the nvo_barcode object, change the li_format =QR_CODE variable to li_format=CODE_39
Also you have to change the dimensions of the code I have put li_width=423 li_height=41. (Take care with the order of the parameters, in my example it is wrong, but nothing happens because the qr measures the same height and width).
.
To read the code the same function of_leer_qr() works since it actually calls the function of_readbarcode() which does not specify format.

Likewise, instead of modifying the functions, you can create new ones or solve it as you see fit.

Best Regards.
Attachments:

Please Log in or Create an account to join the conversation.

Moderators: Appeon Administrator