QR
QR
Hello everyone, I need to print a QR code on a thermal receipt printer.
Although I can generate the QR code, when I try to print it using "dcprint bitmap filename", it doesn't work. I've tried several formats: BMP, PNG, and JPG, but it doesn't print in any of them. The receipt header logo prints without problems, and it's in JPG format.
The problem might be with the parameters @ <nSrow>, <nScol> [, <nErow>, <nEcol> ], but no matter how many times I try, the QR code doesn't appear; it just leaves a blank space. Since I urgently need to print this QR code, another solution would be to find some QR code fonts, and that's where I need help. Do you know where I can buy a QR code font?
Thanks to all.
Although I can generate the QR code, when I try to print it using "dcprint bitmap filename", it doesn't work. I've tried several formats: BMP, PNG, and JPG, but it doesn't print in any of them. The receipt header logo prints without problems, and it's in JPG format.
The problem might be with the parameters @ <nSrow>, <nScol> [, <nErow>, <nEcol> ], but no matter how many times I try, the QR code doesn't appear; it just leaves a blank space. Since I urgently need to print this QR code, another solution would be to find some QR code fonts, and that's where I need help. Do you know where I can buy a QR code font?
Thanks to all.
- Attachments
-
- VF_QR.PNG (444 Bytes) Viewed 1401 times
Re: QR
Hi,
You should generate and print QR code in GIF format.
You should generate and print QR code in GIF format.
Slavoljub Damnjanovic
SD-SoftDesign, Alaska Software Technology Partner
https://www.sd-softdesign.com
https://www.sd-softdesign.rs
SD-SoftDesign, Alaska Software Technology Partner
https://www.sd-softdesign.com
https://www.sd-softdesign.rs
Re: QR
You can't simply use a font for QR-barcodes, since they use one direction too much for fonts.
Although I use a report generator (List&Label), which is able to generate all kinds of barcodes on the fly, I still have three or four old forms created with DCPRINT there and there. It should work with Don't forget to include the full path in the filename.
Although I use a report generator (List&Label), which is able to generate all kinds of barcodes on the fly, I still have three or four old forms created with DCPRINT there and there. It should work with
Code: Select all
DCPRINT BITMAP <cFileName> AUTOSCALEBest regards,
Tom
"Did I offend you?"
"No."
"Okay, give me a second chance."
Tom
"Did I offend you?"
"No."
"Okay, give me a second chance."
Re: QR
It is possibly a problem with DCPRINT which you use. My PowerWin library has PIMAGE() function which can print image in any format, including ICO. I use it to print QR code on a thermal receipt printer in my application for cash register. You can download test version of PowerWin library and try it.It doesn't work in GIF format either.
Slavoljub Damnjanovic
SD-SoftDesign, Alaska Software Technology Partner
https://www.sd-softdesign.com
https://www.sd-softdesign.rs
SD-SoftDesign, Alaska Software Technology Partner
https://www.sd-softdesign.com
https://www.sd-softdesign.rs
Re: QR
I have never seen any problem with QR codes printing using DCPRINT.
Here is an example of a receipt that is printed by the Medallion program.
The output goes to a PDF file by using the Microsoft PDF Printer.
Here is an example of a receipt that is printed by the Medallion program.
The output goes to a PDF file by using the Microsoft PDF Printer.
Code: Select all
IF nPage == 1 .AND. Alltrim(GetFlg('FLAG32')) == 'Y'
@ nRow -20, 10, nRow + 620, 400 DCPRINT ;
BITMAP IniGet('RECEIPTS','ReceiptImagesPath') + '\QR-Code-(iphone)-Referral-edit.Jpg'
@ nRow + 40, 1550, nRow + 600, 2050 DCPRINT ;
BITMAP IniGet('RECEIPTS','ReceiptImagesPath') + '\My_Social_Media_QR-edit.Jpg'
ENDIF The eXpress train is coming - and it has more cars.
Re: QR
Hello,
I've had a lot of work with QR codes.
I started by acquiring a library for that purpose. Alaska didn't have a solution.
A few years later, it's now possible to create QR codes using only Alaska-Xbase (asset available).
You can create them in any format and print them with DCprint.
But you can also simply send ESC sequences to produce the QR code on a receipt printer. ( This is the best quality and faster solution )
What do you need? Do you have an EPSON receipt printer?
You can read this post, maybe it will help.
http://bb.donnay-software.com/Donnay/vi ... E&start=10
I've had a lot of work with QR codes.
I started by acquiring a library for that purpose. Alaska didn't have a solution.
A few years later, it's now possible to create QR codes using only Alaska-Xbase (asset available).
You can create them in any format and print them with DCprint.
But you can also simply send ESC sequences to produce the QR code on a receipt printer. ( This is the best quality and faster solution )
What do you need? Do you have an EPSON receipt printer?
You can read this post, maybe it will help.
http://bb.donnay-software.com/Donnay/vi ... E&start=10
Last edited by PedroAlex on Wed Oct 29, 2025 10:32 am, edited 1 time in total.
Pedro Alexandre
Re: QR
Hi Roger, this is my code:
QrCode(cCadenaQR,cDirectorioFicheroQR,.f.)
if file(cDirectorioFicheroQR)
/ message(cDirectorioFicheroQR)
@ dc_printerrow()-20,10,dc_printerrow()+620,400 DCPRINT BITMAP cDirectorioFicheroQR
endif
The qrCode function generates a QR code in JPG format.
As you can see, I've used your data in the row and column.
The problem is that it prints a blank copy. I'm sending you an image of what the ticket looks like. As you can see, it leaves the QR code space but doesn't print it.
QrCode(cCadenaQR,cDirectorioFicheroQR,.f.)
if file(cDirectorioFicheroQR)
/ message(cDirectorioFicheroQR)
@ dc_printerrow()-20,10,dc_printerrow()+620,400 DCPRINT BITMAP cDirectorioFicheroQR
endif
The qrCode function generates a QR code in JPG format.
As you can see, I've used your data in the row and column.
The problem is that it prints a blank copy. I'm sending you an image of what the ticket looks like. As you can see, it leaves the QR code space but doesn't print it.
- Attachments
-
- WhatsApp Image 2025-10-29 at 18.13.23.jpeg (117.71 KiB) Viewed 1354 times
Re: QR
Try,
@ dc_printerrow()-20,10,dc_printerrow()+620,400 DCPRINT BITMAP cDirectorioFicheroQR AUTOSCALE CENTER
or try this
@ 00,05, 07,45 DCPRINT BITMAP cFileQRCode AUTOSCALE CENTER ( just for check if the bitmap is OK, maybe is too big )
@ dc_printerrow()-20,10,dc_printerrow()+620,400 DCPRINT BITMAP cDirectorioFicheroQR AUTOSCALE CENTER
or try this
@ 00,05, 07,45 DCPRINT BITMAP cFileQRCode AUTOSCALE CENTER ( just for check if the bitmap is OK, maybe is too big )
Pedro Alexandre