How to create qr code in clarion report?

How to create qr code in clarion report. When printing in a POS application, the qr code created by the thermal printer cannot be read. I’m using qrcoder.lib and I’ve tried changing the pixel input parameters from 1 to 50, but I always get the same qr code that can’t be read. I also tried with barcodelibrary.lib, the qr code looks good and it tries to go to the required url, but the problem is that the input string is at most 256 characters and cuts off the rest of the text, and I need over 1000 characters. Attached are two images of qr codes, one that I create with qrcoder.lib that is unreadable and the one that is created by the tax administration that I can easily read even from the screen.
Can someone help me how to create qr code from clarion, is there any tool for that or some dll that can be used in clarion.

module(‘barcodelibrary.lib’)
LibraryVersion(),*CSTRING,PASCAL,RAW
GenerateFile(*CSTRING, *CSTRING), PASCAL, RAW
end

module(‘QRCoder.lib’) GenerateQrCode(bstring,bstring,bstring,bstring,bstring,bstring),pascal,raw,dll(1),name(‘GenerateQrCode’) GenerateQrCodeAsci(bstring,bstring,bstring)bstring,pascal,raw,dll(1),name(‘GenerateQrCodeAsci’)
end !module(‘QRCoder.lib’)
qr_ok qrcoder

! generisi qr cod
loc:name=’./qrrac.bmp’
GenerateQrCode(CLIP(Loc:data),clip(Loc:name),‘2’,‘bmp’,‘black’,‘white’)
stampajQR=0
nijeFiskal=0
tekstNijeFiskal=’’

Just to mention it is not a problem in the dimensions of qr codes, on the laser printer both are read without problems even with smaller dimensions.

Try qrcodelib.dll. There was a discussion about it on this forum
Bar code software plug-ins - ClarionHub

I think I am using EasyCam from Ingasoft for this.

I downloaded a demo version of EasyCam. I couldn’t make the qr code, I can’t set up a url longer than 512 characters using EasyCam, and I need over 1000.

Hmm it should be 255 characters, this is a restriction in the demo.

Just wondering, have you tried printing from the EasyCam demo on a thermal printer?

On the screen and on the thermal printer, I scanned the qr code and the correct url is displayed, but when it starts to open the page in the browser, it displays error 400 (bad request). I see that the reason is because the text I am sending is truncated so not all url characters can be sent. I didn’t check if 256 or 512 characters were sent, I need more than 1000.
https: //sandbox.suf.purs.gov.rs/v/? vl = A0taREJLWUVLS1pEQktZRU … and so on. I can send you the whole url, so try creating a qr at 5x5 cm.
With qrcoder.dll I managed to create 5x5 cm qr code, but it won’t be read every time, but only when I set the density printer settings to 0 and dithering 6x6. I noticed that with these settings the qr code can be read, but less than 5x5 is already a problem.

I guess kinda obvious, but you don’t show it, so I’ll ask…
what does the declaration of loc:data look like?

Hi
I use qrcodelib to print on a POS printer
loc:data = Clip(HIS:Fmem) & ‘’ & Format(HIS:PNo,@n06) & '’ & Format(LocDate,@d10-) & ‘’ & Format(LocTime,@t04) & '’ & Clip(Left(Format(Total,@n_8.2)))
loc:name = ‘.\LocQR.bmp’
FullQRCode(True,False, 0ffffffh, 0, Address(loc:data), 0, 4, 0, 4, 152, 152, Address(loc:name))

HTH

1 Like

loc:data=‘https://sandbox.suf.purs.gov.rs/v/?vl=A0taREJLWUVLS1pEQktZRUu7AAAAlAAAAIDCZwAAAAAAAAABf36Hgr4AAACeo5kO7EAMw0Ro54%2FFTd2RzfHfH0eyfV0q%2BHaZjiA5gESojZVjoSbqCrkGXXcIzor2I82KfTDeZCwJLOXmKhOR9X4EBZGjxfZ16PcDoveH%2B6o1YWGEjb4ZAX8RyUQ%2Br6ZT4RUr7p4D8Q5YoQrsD%2BEx%2FUS6xDM2iZEcv%2BFmgkKaKlJddVQY1%2FK6ryFpT%2BhGu08A2iQsglgPmCgGshexhjnCPjbTGJicqSnaE0lYQcqDcxHCrZL%2FUkjcIjJ8dGssh86JOcFfy20en38ar3Xnd0EOF6xgBBXtEr1URmWt0ugSWvaw6wUaDjoUP2K%2F0XJFdm2v8DsYrKJU%2FLqSdwXtlvC4VJCCVnLCv0aEDZLACxhlIgHv5cTk4GsbXnYnZ7vC8zR7rV9L8UDdlIsvI9%2F%2Fd7ELOtB8IrwrcHUtF2A16%2BC5slUW4bqh7db0iatNAOpeTVsBEQZ5uqU8eBMxK2gT7W1Zv%2Fuv3agSmqAo5psDPd6Af0Vqlw0RJsPHhuqp4ZI7L24DqzSqnG1zCW%2FIsmXP74apE6%2B7US0ElNlvnXi0SSX4eAYoAG8cV8HTkdgsZYA%2BvTMqEWLio7M2RQYewFv0DiXaNqm0gmTAKMVxpSBtZgTDBD4vYzzzTGx7Ep9U1nuXEaRNk%2FJz1IBT%2Fvc6D2nkJEqZoqij3a5YWB57Xhdlx59MKMwB%2BK2ctHNFMC2A2dsS5UA%3D

When the loc: data page opens, set the language to English and look at the Journal, which contains the qr code from the tax administration. This code can be read on the screen without any problems and it can be seen that it is different from the code I create with qrcoder.dll.

In the demo you can’t encode more than 256, but the class itself has no such restrictions.

you’ve shown me the assignment of loc:data, but I’m interested in the declaration of loc:data.
As in the line;

loc:data string(…

loc:data cstring(2048)

so what happens if you declare it as BSTRING to match your prototype for GenerateQrCode? And the same for the other fields. Does that make a difference?

from the help:

The BSTRING is equivalent to the OLE API 's BSTR data type. A BSTRING is a pointer. The pointer points to the first character in the string of Unicode characters (Wide characters of 2 bytes storage). It consists of a string of Unicode characters, that may contain multiple embedded null characters, and a terminator (a NULL (0x0000) wide character).

You can try a demo of the dll we are using here. I think it should work ok.
If you are interested just let me know by priv mail.
regards,
marcelo

it has nearly 900 chars

Marcelo, I can’t read this qr code. Look at the beginning of the post the first left qr code, it has over 500 characters and is much smaller and reads without problems. With QRCoder.lib you can create qr codes with more than 500 characters, but they must be larger than 5x5 cm in order to be readable. I would like to know how to create an easily readable qr for smaller dimensions with more than 500 characters?

Tosho, can you with qrcodelib first create the qr code from the link I set up and send it to me to see what it looks like and how it reads?

this is the qr for the string you post:

loc:data=‘https://sandbox.suf.purs.gov.rs/v/?vl=A0taREJLWUVLS1pEQktZRUu7AAAAlAAAAIDCZwAAAAAAAAABf36Hgr4AAACeo5kO7EAMw0Ro54%2FFTd2RzfHfH0eyfV0q%2BHaZjiA5gESojZVjoSbqCrkGXXcIzor2I82KfTDeZCwJLOXmKhOR9X4EBZGjxfZ16PcDoveH%2B6o1YWGEjb4ZAX8RyUQ%2Br6ZT4RUr7p4D8Q5YoQrsD%2BEx%2FUS6xDM2iZEcv%2BFmgkKaKlJddVQY1%2FK6ryFpT%2BhGu08A2iQsglgPmCgGshexhjnCPjbTGJicqSnaE0lYQcqDcxHCrZL%2FUkjcIjJ8dGssh86JOcFfy20en38ar3Xnd0EOF6xgBBXtEr1URmWt0ugSWvaw6wUaDjoUP2K%2F0XJFdm2v8DsYrKJU%2FLqSdwXtlvC4VJCCVnLCv0aEDZLACxhlIgHv5cTk4GsbXnYnZ7vC8zR7rV9L8UDdlIsvI9%2F%2Fd7ELOtB8IrwrcHUtF2A16%2BC5slUW4bqh7db0iatNAOpeTVsBEQZ5uqU8eBMxK2gT7W1Zv%2Fuv3agSmqAo5psDPd6Af0Vqlw0RJsPHhuqp4ZI7L24DqzSqnG1zCW%2FIsmXP74apE6%2B7US0ElNlvnXi0SSX4eAYoAG8cV8HTkdgsZYA%2BvTMqEWLio7M2RQYewFv0DiXaNqm0gmTAKMVxpSBtZgTDBD4vYzzzTGx7Ep9U1nuXEaRNk%2FJz1IBT%2Fvc6D2nkJEqZoqij3a5YWB57Xhdlx59MKMwB%2BK2ctHNFMC2A2dsS5UA%3D’

It has 848 chars, and create a symbol QR 20-L, with 97 segments.
I can read it without problem using an app in a phone.