Boa tarde parceiros, como vão ?
Como imprimo código de barras usando o Harbour 3.2 ?
Agradeço a todos.
MaurÃcio.

Moderador: Moderadores
#BGD e FreeImage
hbgd.hbc
hbfimage.hbc
I:/hb32/comp/mingw/bin/../lib/gcc/i686-w64-mingw32/7.3.0/../../../../i686-w64-mingw32/bin/ld.exe: cannot find -lhbgd
asimoes escreveu:pode usar também Win_Prn() usando fonte para código de barras.
PROCEDURE Main()
LOCAL hSurface := cairo_pdf_surface_create( hb_FNameExtSet( __FILE__, ".pdf" ), 567, 794 ) // A4
LOCAL hCairo := cairo_create( hSurface )
cairo_set_source_rgb( hCairo, 1.0, 1.0, 1.0 )
cairo_paint( hCairo )
cairo_select_font_face( hCairo, "sans-serif", CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL )
cairo_set_font_size( hCairo, 10 )
cairo_set_source_rgb( hCairo, 0, 0, 0 )
DrawBarcode( hCairo, 20, 1, "EAN13", "477012345678" )
DrawBarcode( hCairo, 40, 1, "EAN8", "1234567" )
DrawBarcode( hCairo, 60, 1, "UPCA", "01234567891" )
DrawBarcode( hCairo, 80, 1, "UPCE", "123456" )
DrawBarcode( hCairo, 100, 1, "CODE39", "ABC123" )
DrawBarcode( hCairo, 120, 1, "CODE39", "ABC123", HB_ZEBRA_FLAG_CHECKSUM )
DrawBarcode( hCairo, 140, 0.5, "CODE39", "ABC123", HB_ZEBRA_FLAG_CHECKSUM + HB_ZEBRA_FLAG_WIDE2_5 )
DrawBarcode( hCairo, 160, 1, "CODE39", "ABC123", HB_ZEBRA_FLAG_CHECKSUM + HB_ZEBRA_FLAG_WIDE3 )
DrawBarcode( hCairo, 180, 1, "ITF", "1234", HB_ZEBRA_FLAG_WIDE3 )
DrawBarcode( hCairo, 200, 1, "ITF", "12345678901", HB_ZEBRA_FLAG_CHECKSUM )
DrawBarcode( hCairo, 220, 1, "MSI", "1234" )
DrawBarcode( hCairo, 240, 1, "MSI", "1234", HB_ZEBRA_FLAG_CHECKSUM + HB_ZEBRA_FLAG_WIDE3 )
DrawBarcode( hCairo, 260, 1, "MSI", "1234567", HB_ZEBRA_FLAG_CHECKSUM )
DrawBarcode( hCairo, 280, 1, "CODABAR", "40156", HB_ZEBRA_FLAG_WIDE3 )
DrawBarcode( hCairo, 300, 1, "CODABAR", "-1234", HB_ZEBRA_FLAG_WIDE3 )
DrawBarcode( hCairo, 320, 1, "CODE93", "ABC-123" )
DrawBarcode( hCairo, 340, 1, "CODE93", "TEST93" )
DrawBarcode( hCairo, 360, 1, "CODE11", "12", HB_ZEBRA_FLAG_WIDE3 )
DrawBarcode( hCairo, 380, 1, "CODE11", "1234567890", HB_ZEBRA_FLAG_CHECKSUM + HB_ZEBRA_FLAG_WIDE3 )
DrawBarcode( hCairo, 400, 1, "CODE128", "Code 128" )
DrawBarcode( hCairo, 420, 1, "CODE128", "61300073570004616" )
DrawBarcode( hCairo, 440, 1, "CODE128", "Wikipedia" )
DrawBarcode( hCairo, 460, 1, "PDF417", "Hello, World of Harbour!!! It's 2D barcode PDF417 :)" )
DrawBarcode( hCairo, 540, 1, "DATAMATRIX", "Hello, World of Harbour!!! It's 2D barcode DataMatrix :)" )
DrawBarcode( hCairo, 580, 1, "QRCODE", "https://en.wikipedia.org/wiki/QR_Code" )
cairo_destroy( hCairo )
cairo_surface_write_to_png( hSurface, hb_FNameExtSet( __FILE__, ".png" ) )
cairo_surface_destroy( hSurface )
RETURN
Usuários vendo este fórum: Nenhum usuário registrado online e 6 visitantes