xBase++ QR Code print for tax authorities pruposes.

Xbase++ 2.0 Build 554 or later
Post Reply
Message
Author
User avatar
PedroAlex
Posts: 145
Joined: Tue Feb 09, 2010 3:06 am

xBase++ QR Code print for tax authorities pruposes.

#1 Post by PedroAlex »

Hello people,

Here, the tax authorities published a law that requires printing a QR code on all invoices and business documents, even those that are printed on a receipt.
In my case, I print the tickets in text mode, that is, I use commands like "Dcprint say". I am studying the possibilities that xbase can support to print this type of data in a stable and robust way..
I ask, if any programmer who frequents this forum has any experience in this type of work and if they can make any comments, opinions or technical advice.
Some recommendations or examples can help.

Many Thanks in advance..
Pedro Alexandre

User avatar
Tom
Posts: 797
Joined: Thu Jan 28, 2010 12:59 am
Location: Berlin, Germany

Re: xBase++ QR Code print for tax authorities pruposes.

#2 Post by Tom »

Hi, Pedro.

Maybe this is a good moment to migrate a professional report writing tool like "List & Label" (www.combit.net), which will increase the quality of your app and provide stuff like 2D-barcodes out of the box and without additional programming. And lots of other features.

It is possible to paint QR-barcodes using the GRA-functions, which for instance can be accessed via DCPRINT BOX.

Here's a project which someone adapted to be used with Visual Foxpro, so it should be possible to move it to Xbase++ aswell: https://zint.github.io/
Best regards,
Tom

"Did I offend you?"
"No."
"Okay, give me a second chance."

patito
Posts: 121
Joined: Tue Aug 31, 2010 9:01 pm

Re: xBase++ QR Code print for tax authorities pruposes.

#3 Post by patito »

Hi Pedro

attached qrcode program in xbase++ using visual foxpro dll

best regard
Hector Pezoa
Attachments
qr-vfp.rar
(267.39 KiB) Downloaded 55 times
qr-vfp.rar
(267.39 KiB) Downloaded 41 times

User avatar
PedroAlex
Posts: 145
Joined: Tue Feb 09, 2010 3:06 am

Re: xBase++ QR Code print for tax authorities pruposes.

#4 Post by PedroAlex »

Tom,
I appreciate your comments

Hector,
Thank you very much for the example.
I've done some tests.
It seems to me a solution for this case.
Pedro Alexandre

messaoudlazhar
Posts: 32
Joined: Mon Dec 23, 2013 2:10 pm

Re: xBase++ QR Code print for tax authorities pruposes.

#5 Post by messaoudlazhar »

Sample tested with xbase++,
controlled with QR Scanner

Code: Select all

*********************** Functions BarCodeLibrary.DLL ********************************
DLLFUNCTION SetConfiguration(nSize,nType);
            USING STDCALL FROM BarCodeLibrary.DLL
DLLFUNCTION GenerateFile(cText,cFileOut);
            USING STDCALL FROM BarCodeLibrary.DLL

*********-----------------
Procedure CreateQRCodeImage
 Parameters cQrTexte,cRetFileImg,nSizeQR,nTypeQR
BEGIN SEQUENCE
   If Empty(nTypeQR)
      BREAK
   Endif
   If Empty(cRetFileImg)
      BREAK
   Endif
   If nSizeQR<2 .Or. nSizeQR>12
      MsgBox("Incorrect size: 2 .. 12")
      BREAK
   Endif
   If nTypeQR<0 .Or. nTypeQR>2
      MsgBox("Incorrect image type file: 0 .. 2")
      BREAK
   Endif
   MyConfQR:=SetConfiguration(nSizeQR,nTypeQR)
   // If Oem, conevrt text to ansi, other : GenerateFile(cQrTexte,cRetFileImg)
   MyRetFileQR:=GenerateFile(ConvToAnsiCP(cQrTexte),cRetFileImg)
END SEQUENCE
Return
*********-----------
Procedure TestQr
MyTexte:="Test,  It's great QR code (xbase ++)"
MyTexte+=Chr(13)+Chr(10)+Dtoc(Date())+" … "+Time()
MFileImg:="Lazhar.Jpg"
CreateQRCodeImage(Mytexte,MFileImg,6,1)
Return

User avatar
PedroAlex
Posts: 145
Joined: Tue Feb 09, 2010 3:06 am

Re: xBase++ QR Code print for tax authorities pruposes.

#6 Post by PedroAlex »

This DLL has the limitation of only supporting 255 characters in the string to generate the QRcode.

I need generate a QRCode with 455 chars.

Anybody now other solution?

Many Thanks.
Pedro Alexandre

Piotr D
Posts: 87
Joined: Mon Jul 28, 2014 1:26 am
Location: Poznań, Poland

Re: xBase++ QR Code print for tax authorities pruposes.

#7 Post by Piotr D »

Pedro,
you can use alternative ActiveX library for printing QR Code, like MW6QRCode or StrokeScribe. Here you find about this:
http://bb.donnay-software.com/donnay/vi ... f=2&t=2761
You can manipulate type/size of QR code and with StrokeScribe you can pass the text in various code type, not only UTF-8.

Regards
Piotr

User avatar
PedroAlex
Posts: 145
Joined: Tue Feb 09, 2010 3:06 am

Re: xBase++ QR Code print for tax authorities pruposes.

#8 Post by PedroAlex »

Piotr,
Thank you for the tip.
This is the correct way. An external DLL ou activex Control.
Pedro Alexandre

Post Reply