Page 1 of 1

QR code

Posted: Thu Dec 05, 2013 3:38 pm
by Blessed
Hello everyone.
In my country is requiring PC printed bills are adding a QR code.
Anyone know how to start something.

Re: QR code

Posted: Thu Dec 05, 2013 4:16 pm
by Roger Seiler
What is a QR code?

Re: QR code

Posted: Thu Dec 05, 2013 4:20 pm
by Willi Quintana
Hi, use this code......
/--------------------------------------------------------------------------------------------------
Function QRGenerator(cTexto, cPath, cBmp) // genera codigo qr
local cStr, cFile
LOCAL nResp

#Define DC_CALL_STD 0x0020

STATIC qrDLL

DEFAULT cPath := "BMP\"
DEFAULT cBmp := "QR.bmp"
DEFAULT cTexto := "SVITE SOFTWARE ADMINISTRATIVO"

IF !FILE("QRCodelib.Dll")
MsgStop("Sin Librería de Soporte","Improcedente")
Return(NIl)
EndIF

cStr := cTexto //"Texto a QR Code"
cFile := cPath + cBmp

qrDLL:=LoadLibrary("QRCodelib.Dll" )
nResp:=DllCall(qrDLL,DC_CALL_STD,"FastQRCode",cStr,cFile)
FreeLibrary(qrDLL)

RETURN (cFile)

Re: QR code

Posted: Thu Dec 05, 2013 5:37 pm
by Blessed
Roger
Here a detail of QR Codes
http://marksprague.wordpress.com/qr-cod ... -qr-codes/

Willy thanks for replying.
I have seen that there is a range of variants QRCodelib.Dll
And I found are extra, which you are using?
To avoid falling into bad experiences or headaches?

Re: QR code

Posted: Thu Dec 05, 2013 6:41 pm
by Blessed
thanks

I found this same example, the forum fivewin brasil
http://fivewin.com.br/index.php?/topic/ ... resolvido/

And there's the download link QRCodelib.Dll
http://www.oho.com.br/fw/qr.zip

Re: QR code

Posted: Thu Dec 05, 2013 8:26 pm
by Daniel Garcia-Gil
Hello

Harbour support QR code without use any DLL, locate in contributions "zebra"

Re: QR code

Posted: Fri Dec 06, 2013 11:58 am
by FiveWiDi
Daniel Garcia-Gil wrote:Hello

Harbour support QR code without use any DLL, locate in contributions "zebra"
Daniel,
Sabes si hay algun ejemplo en la versión que se distribuye de Fivewin?
Se pueden consultar algun ejemplo en algún lugar?
Que LIB se debe lincar la aplición?

Gracias,

Re: QR code

Posted: Wed Dec 11, 2013 7:03 pm
by vensanto
Ciao
questa è la funzione che utilizzo per stampare il QRCode
spero vi possa essere utile

===

#Include "FiveWin.ch"

* richiede la libreria HBZEBRA.LIB

* *********************************************************
* PROCEDURE MAIN
* PRINT oPRN PREVIEW
* PAGE
* EanQRCode(oPRN,50,50,1,"www.veneziasoft.com")
* ENDPAGE
* ENDPRINT
* RETURN
* *********************************************************

* iFlags = estratto da QRCODE.C della libreria HBZEBRA.LIB
*
* #define HB_ZEBRA_FLAG_QR_LEVEL_MASK 0x0700
* #define HB_ZEBRA_FLAG_QR_LEVEL_L 0x0100
* #define HB_ZEBRA_FLAG_QR_LEVEL_M 0x0200
* #define HB_ZEBRA_FLAG_QR_LEVEL_Q 0x0300
* #define HB_ZEBRA_FLAG_QR_LEVEL_H 0x0400
*
* switch( iFlags & HB_ZEBRA_FLAG_QR_LEVEL_MASK )
* {
* case HB_ZEBRA_FLAG_QR_LEVEL_M:
* iLevel = 1;
* break;
* case HB_ZEBRA_FLAG_QR_LEVEL_Q:
* iLevel = 2;
* break;
* case HB_ZEBRA_FLAG_QR_LEVEL_H:
* iLevel = 3;
* break;
* default:
* iLevel = 0;
* break;
*

* *********************************************************
* EanQRCode(oPRN, nY, nX, nWidth, nQRCODE, nColor, iFlags)
*
* oPRN = Output Device
* nY = Rigo di inizio stampa
* nX = Colonna di inizio stampa
* nWidth = Spessore del QRCODE - default = 1
* nQRCODE = Stringa del QRCODE
* nColor = Colore del QRCODE - default = CLR_BLACK
* iFlags = Flags
*
* *********************************************************

******************************************************************
Function EanQRCode(oPRN, nY, nX, nWidth, nQRCODE, nColor, iFlags)
Local hCODE,oBRUSH,nRET
Local nCLR:=IIF(nColor<>NIL,nColor,CLR_BLACK)
Local nLineWidth:=IIF(nWidth==NIL .OR. nWidth<1,1,nWidth)
Local nLineHeight:=nLineWidth
Local nSCALE:=7.2

hCODE:=hb_zebra_create_qrcode(nQRCODE,iFlags)

nY *= nSCALE
nLineWidth *= nSCALE

IF hCODE != NIL

IF hb_zebra_geterror( hCODE ) == 0

IF Empty( nLineHeight )
nLineHeight := 16
ENDIF

IF hb_zebra_geterror( hCODE ) != 0
RETURN HB_ZEBRA_ERROR_INVALIDZEBRA
Endif

DEFINE BRUSH oBRUSH COLOR nCLR
nRET:=hb_zebra_draw( hCODE, {|x,y,w,h| oPRN:FillRect({Int(y+.5), Int(x+.5), Int(y+.5)+Int(h)+1, Int(x+.5)+Int(w)},oBRUSH) }, nX*nSCALE, nY, nLineWidth, nLineHeight*nSCALE )
oBRUSH:End()

Endif
hb_zebra_destroy( hCODE )

Endif
Return nRET

===

Saluti

Santo Venezia

Re: QR code

Posted: Thu Nov 03, 2016 6:12 pm
by Romeo
Ottima funzione, molto utile !

E' possibile stampare il QRCode anche nei Report oltre che nelle printer


***
Good function to print a QrCode in oprn:...

Is it possible to print the QrCode also in a report ?


Grazie

Romeo/Zngoni

Re: QR code

Posted: Sat Jan 28, 2017 6:22 pm
by Jilo1234
Hola estoy buscando una aplicacion que me pueda sacar el codigo qr de algun texto.
Quisiera saber si alguien tiene una app ya compilada y su codigo fuente en fwh que pudiera proporcionarme.

Mi correo: manuelantonio960504@gmail.com

Re: QR code

Posted: Fri Jun 16, 2017 10:57 am
by richard-service
Hi

How to read QR code data?

Re: QR code

Posted: Fri Jun 16, 2017 12:37 pm
by MarcoBoschi
richard

In android I use barcode scanner
https://github.com/zxing/zxing

It works fine!
bye

Re: QR code

Posted: Fri Jun 16, 2017 12:49 pm
by MarcoBoschi
Romeo,
Since I still use ReportPro in my programs I create a bmp file containing image of qrcode in a subfolder and from report I create an object
Picture source "File Name returned from an expression"
For instance in my table of articles there is a field named qrcode


Bye