QR code

QR code

Postby Blessed » Thu Dec 05, 2013 3:38 pm

Hello everyone.
In my country is requiring PC printed bills are adding a QR code.
Anyone know how to start something.
Oscar A. Martinez
http://www.multisofthn.com
Honduras, Centro America
xHarbour Enterprise 1.2.2, Fivewin 13.06
User avatar
Blessed
 
Posts: 243
Joined: Wed Sep 19, 2007 4:32 pm
Location: Honduras, C.A.

Re: QR code

Postby Roger Seiler » Thu Dec 05, 2013 4:16 pm

What is a QR code?
User avatar
Roger Seiler
 
Posts: 223
Joined: Thu Dec 01, 2005 3:34 pm
Location: Nyack, New York, USA

Re: QR code

Postby Willi Quintana » Thu Dec 05, 2013 4:20 pm

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)
User avatar
Willi Quintana
 
Posts: 1022
Joined: Sun Oct 09, 2005 10:41 pm
Location: Cusco - Perú

Re: QR code

Postby Blessed » Thu Dec 05, 2013 5:37 pm

Roger
Here a detail of QR Codes
http://marksprague.wordpress.com/qr-codes-technology/understanding-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?
Oscar A. Martinez
http://www.multisofthn.com
Honduras, Centro America
xHarbour Enterprise 1.2.2, Fivewin 13.06
User avatar
Blessed
 
Posts: 243
Joined: Wed Sep 19, 2007 4:32 pm
Location: Honduras, C.A.

Re: QR code

Postby Blessed » Thu Dec 05, 2013 6:41 pm

thanks

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

And there's the download link QRCodelib.Dll
http://www.oho.com.br/fw/qr.zip
Oscar A. Martinez
http://www.multisofthn.com
Honduras, Centro America
xHarbour Enterprise 1.2.2, Fivewin 13.06
User avatar
Blessed
 
Posts: 243
Joined: Wed Sep 19, 2007 4:32 pm
Location: Honduras, C.A.

Re: QR code

Postby Daniel Garcia-Gil » Thu Dec 05, 2013 8:26 pm

Hello

Harbour support QR code without use any DLL, locate in contributions "zebra"
User avatar
Daniel Garcia-Gil
 
Posts: 2365
Joined: Wed Nov 02, 2005 11:46 pm
Location: Isla de Margarita

Re: QR code

Postby FiveWiDi » Fri Dec 06, 2013 11:58 am

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,
Un Saludo
Carlos G.

FiveWin 24.02 + Harbour 3.2.0dev (r2403071241), BCC 7.7 Windows 10
FiveWiDi
 
Posts: 1203
Joined: Mon Oct 10, 2005 2:38 pm

Re: QR code

Postby vensanto » Wed Dec 11, 2013 7:03 pm

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
User avatar
vensanto
 
Posts: 58
Joined: Thu Oct 13, 2005 1:26 pm
Location: ITALIA

Re: QR code

Postby Romeo » Thu Nov 03, 2016 6:12 pm

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
Romeo
 
Posts: 340
Joined: Thu Jan 25, 2007 3:53 pm
Location: Milan (Italy)

Re: QR code

Postby Jilo1234 » Sat Jan 28, 2017 6:22 pm

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
Jilo1234
 
Posts: 7
Joined: Sat Jan 28, 2017 5:08 am

Re: QR code

Postby richard-service » Fri Jun 16, 2017 10:57 am

Hi

How to read QR code data?
Best Regards,

Richard

Harbour 3.2.0dev (r2402101027) => Borland C++ v7.7 32bit
MySQL v8.0 /ADS v10
Harbour 3.2.0dev (r2011030937) => Borland C++ v7.4 64bit
User avatar
richard-service
 
Posts: 804
Joined: Tue Oct 16, 2007 8:57 am
Location: New Taipei City, Taiwan

Re: QR code

Postby MarcoBoschi » Fri Jun 16, 2017 12:37 pm

richard

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

It works fine!
bye
User avatar
MarcoBoschi
 
Posts: 1066
Joined: Thu Nov 17, 2005 11:08 am
Location: Padova - Italy

Re: QR code

Postby MarcoBoschi » Fri Jun 16, 2017 12:49 pm

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
User avatar
MarcoBoschi
 
Posts: 1066
Joined: Thu Nov 17, 2005 11:08 am
Location: Padova - Italy


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 82 guests