But most importantly, we DO NOT NEED any 3rd party library for generating, display and printing any barcodes or QRCodes.
FWH is natively capable of generating and printing not only CODE128 barcodes but many other types of barcodes and qr-codes, with or without HaruPDF.
Please try this small example:
- Code: Select all Expand view
#include "fivewin.ch"
REQUEST FWZEBRA
REQUEST FWHARU
function Main()
local cName, cCity, cCountry, cItem
local oPrn, oFont
cName := "Antonio Linares"
cCity := "Marbella"
cCountry := "Spain"
cItem := "123456789012"
TPrinter():lUseHaruPDF := .t.
PRINT oPrn PREVIEW FILE "barcode.pdf"
DEFINE FONT oFont NAME "TAHOMA" SIZE 0,-14 OF oPrn
PAGE
@ 1.00, 1 PRINT TO oPrn TEXT cName SIZE 4, 0.3 INCHES FONT oFont
@ 1.30, 1 PRINT TO oPrn TEXT cCity SIZE 4, 0.3 INCHES FONT oFont
@ 1.60, 1 PRINT TO oPrn TEXT cCountry SIZE 4, 0.3 INCHES FONT oFont
@ 1.90, 1 PRINT TO oPrn TEXT cItem SIZE 4, 0.3 INCHES FONT oFont
@ 1.00,5.00 PRINT TO oPrn TEXT "Address :" + CRLF + cName + CRLF + cCity + CRLF + cCountry + CRLF + cItem ;
AS BARCODE TYPE "QR-CODE" SIZE 2,2 INCHES
@ 3.0, 1 PRINT TO oPrn TEXT cName + " : CODE128" SIZE 4.0, 0.3 INCHES FONT oFont
@ 3.5, 1 PRINT TO oPrn TEXT cName AS BARCODE TYPE "CODE128" SIZE 4,1 INCHES
@ 5.5, 1 PRINT TO oPrn TEXT cItem + " : EAN13" SIZE 4.0, 0.3 INCHES FONT oFont
@ 6.0, 1 PRINT TO oPrn TEXT cItem AS BARCODE TYPE "EAN13" SIZE 4,1 INCHES
ENDPAGE
ENDPRINT
RELEASE FONT oFont
return nil
Please build this sample in the samples folder using buildh.bat or buildx.bat.
This is the screen-shot of PDF file generated with HaruPDF:
Please re-consider.
Do you really need a 3rd party lib?
Why can you not use FWH native capability to generate Bar Codes?