1. Damian Jimenez
  2. PowerBuilder
  3. Wednesday, 3 March 2021 11:49 AM UTC

Im working with PB2017R3

Testing  QR Barcode Fonts

INTRO
-----------------
https://www.barcoderesource.com/qrcodebarcode.shtml

the example was replicated and QR could be generated, but in a RichText object only


The dll function itself translates into a String with binary format an array (zeros, ones, carriage return) the QR to represent then to visualize you need to use the source CCodeQR  in a Richtext Control that was registered in windows (previous steps) and this paints the "pixels" of the QR code

but from there to taking it to BMP, PNG or JPG it could not be achieved easily it would take more research and testing time

the only option I can think of, it would be from the program to issue a command that prints the generated pdf in a variable size passed as a parameter, but perhaps a better way to generate the png image. 


QUESTION
-----------------
I wanted to know if you have any recommendations to translate that QR code (in string, html, pdf, rtf format ) to image thanks a lot


Damian Jimenez
Integral Software
Paraná Entre Rios
Argentina

Bruce Armstrong Accepted Answer Pending Moderation
  1. Sunday, 28 March 2021 05:56 AM UTC
  2. PowerBuilder
  3. # 1

I'd suggest an alternate approach.  The problem here is that what this will generate is a bunch of text and it requires their font to convert that text into the QR code.  That's a rather convoluted way to get the QR code.

One approach is to use a QR Code API.  For the Two Factor Authentication code sample I used one provided by Google, but that one is deprecated (they could remove it without notice at any point).  There are other services out there though such as goqr.me which is free, or paid services such as QR Code Monkey, Beaconstac or QR Code Generator.

Another approach would be to use a library that generates QR codes.  For example, there is one called QRCoder for .Net.  I wrote a wrapper for that and created a demo application that shows how to use it from PowerBuilder.  You can find the code sample in CodeXchange, and an article explaining how it works in the Tech Articles.

Comment
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.