Impresión de Códigos de Barra con TPrinter

Re: Impresión de Códigos de Barra con TPrinter

Postby karinha » Mon Jul 31, 2017 7:22 pm

En mi caso:

Image

Code: Select all  Expand view

#include "Fivewin.ch"

Function Main()

   local oWnd
   local oBar
   local oBtt1
   local oBtt2
   local oSay1
   local oSay2
   local oSay3
   local oFontText1
   local oFontBar
   local oFontBar1
   // local cCode      := "12345678"
   // Codigo de Barrasÿ:
   local cCode      := "7896714231143"  // Produto Farmaceutico.

   // C:\FWH1701\SAMPLES\EAN-13.TTF funciona perfecto
   AddFontResource( ".\Ean-13.ttf" )

   DEFINE FONT oFontText1 NAME "Arial"   SIZE  00, -36
   DEFINE FONT oFontBar   NAME "EAN-13"  SIZE  00, -36
   DEFINE FONT oFontBar1  NAME "EAN-13"  SIZE  20, -36

   DEFINE WINDOW oWnd FROM 0, 0 TO 660, 660 TITLE "Teste con EAN13.TTF" PIXEL

   oWnd:SetFont( oFontText1 )

   DEFINE BUTTONBAR oBar SIZE 48, 48 OF oWnd //2007

   DEFINE BUTTON oBtt1 PROMPT "Salir" OF oBar ACTION oWnd:End() TOOLTIP "Salir" CENTER

   oBtt1:nWidth := 96

   //oBar:aControls[ 1 ]:nWidth := 96

   @ 060, 100 SAY oSay1 PROMPT "Produto: " PIXEL FONT oFontText1 SIZE 150, 40

   @ 100, 100 SAY oSay1 PROMPT cCode PIXEL FONT oFontText1 SIZE 260, 40

   @ 160, 100 SAY oSay2 PROMPT cCode PIXEL FONT oFontBar   SIZE 210, 60

   @ 240, 100 SAY oSay2 PROMPT cCode PIXEL FONT oFontBar1  SIZE 210, 60

   ACTIVATE WINDOW oWnd

   oFontText1:End()
   oFontBar:End()
   oFontBar1:End()

Return NIL
 


Regards, saludos.
João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
User avatar
karinha
 
Posts: 7190
Joined: Tue Dec 20, 2005 7:36 pm
Location: São Paulo - Brasil

Re: Impresión de Códigos de Barra con TPrinter

Postby hmpaquito » Tue Aug 01, 2017 12:10 pm

Hablando de impresion de codigo de barras,

Hace unos meses me topé con una impresora térmica. Utilicé la librería BarLib de Cayetano, pero no imprimía nada. En cambio desde Word si imprimía sin ningun tipo de problema o configuración especial.

Probando, probando y probando resultaba que había que configurar, en mi fwh programa, el alto y ancho del papel (ojo que es continuo) a valores extrañísimos, que no se acercaban ni a la realidad. También tuve que imprimir rotando los SAYs, y unas cuantas peripecias más.

Total que tuve que hacer una configuración de la impresión muy rara para que al final si imprimiera.

Me dio la sensación que Word no utilizaba el mismo procesador de impresión que mi fwh programa.

Por supuesto, delante del cliente quedé como Rufete en Lorca: Word imprimió a la primera y yo tuve que dar más de mil cabezazos para conseguirlo.

¿ Alguna idea o experiencia sobre el asunto ?
hmpaquito
 
Posts: 1482
Joined: Thu Oct 30, 2008 2:37 pm

Re: Impresión de Códigos de Barra con TPrinter

Postby cnavarro » Tue Aug 01, 2017 12:32 pm

Joao, en tu caso, que no instalas el font, al final de tu código, no deberías utilizar?

Code: Select all  Expand view

RemoveFontResource( ".\Ean-13.ttf" )
 


Saludos
Cristobal Navarro
Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo
El secreto de la felicidad no está en hacer lo que te gusta, sino en que te guste lo que haces
User avatar
cnavarro
 
Posts: 6500
Joined: Wed Feb 15, 2012 8:25 pm
Location: España

Re: Impresión de Códigos de Barra con TPrinter

Postby karinha » Tue Aug 01, 2017 1:10 pm

Pronto master. Many thanks.

Code: Select all  Expand view

#include "Fivewin.ch"

Function Main()

   local oWnd
   local oBar
   local oBtt1
   local oBtt2
   local oSay1
   local oSay2
   local oSay3
   local oFontText1
   local oFontBar
   local oFontBar1
   // local cCode      := "12345678"
   // Codigo de Barrasÿ:
   local cCode      := "7896714231143"  // Produto Farmaceutico.

   SetBalloon( .T. ) // Balloon shape required for tooltips
   SkinButtons()    

   // C:\FWH1701\SAMPLES\EAN-13.TTF funciona perfecto
   AddFontResource( ".\Ean-13.ttf" )

   DEFINE FONT oFontText1 NAME "Arial"   SIZE  00, -36
   DEFINE FONT oFontBar   NAME "EAN-13"  SIZE  00, -36
   DEFINE FONT oFontBar1  NAME "EAN-13"  SIZE  20, -36

   DEFINE WINDOW oWnd FROM 0, 0 TO 660, 660 TITLE "Teste con EAN13.TTF" PIXEL

   oWnd:SetFont( oFontText1 )

   DEFINE BUTTONBAR oBar SIZE 48, 48 OF oWnd //2007

   DEFINE BUTTON oBtt1 PROMPT "Salir" OF oBar ACTION oWnd:End() TOOLTIP "Salir" CENTER

   oBtt1:nWidth := 96

   //oBar:aControls[ 1 ]:nWidth := 96

   @ 060, 100 SAY oSay1 PROMPT "Produto: " PIXEL FONT oFontText1 SIZE 150, 40

   @ 100, 100 SAY oSay1 PROMPT cCode PIXEL FONT oFontText1 SIZE 260, 40

   @ 160, 100 SAY oSay2 PROMPT cCode PIXEL FONT oFontBar   SIZE 210, 60

   @ 240, 100 SAY oSay2 PROMPT cCode PIXEL FONT oFontBar1  SIZE 210, 60

   ACTIVATE WINDOW oWnd

   oFontText1:End()
   oFontBar:End()
   oFontBar1:End()

   RemoveFontResource( ".\Ean-13.ttf" )

   FreeResources()
   SysRefresh()

   RELEASE All
   Hb_GCAll( .T. )

   CLEAR MEMORY
   PostQuitMessage( 0 )

   __QUIT()

Return NIL
 


Regards, saludos.
João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
User avatar
karinha
 
Posts: 7190
Joined: Tue Dec 20, 2005 7:36 pm
Location: São Paulo - Brasil

Re: Impresión de Códigos de Barra con TPrinter

Postby karinha » Tue Aug 01, 2017 1:11 pm

hmpaquito wrote:Hablando de impresion de codigo de barras,

Hace unos meses me topé con una impresora térmica. Utilicé la librería BarLib de Cayetano, pero no imprimía nada. En cambio desde Word si imprimía sin ningun tipo de problema o configuración especial.

Probando, probando y probando resultaba que había que configurar, en mi fwh programa, el alto y ancho del papel (ojo que es continuo) a valores extrañísimos, que no se acercaban ni a la realidad. También tuve que imprimir rotando los SAYs, y unas cuantas peripecias más.

Total que tuve que hacer una configuración de la impresión muy rara para que al final si imprimiera.

Me dio la sensación que Word no utilizaba el mismo procesador de impresión que mi fwh programa.

Por supuesto, delante del cliente quedé como Rufete en Lorca: Word imprimió a la primera y yo tuve que dar más de mil cabezazos para conseguirlo.

¿ Alguna idea o experiencia sobre el asunto ?


Cual és la impresora térmica?

Saludos.
João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
User avatar
karinha
 
Posts: 7190
Joined: Tue Dec 20, 2005 7:36 pm
Location: São Paulo - Brasil

Re: Impresión de Códigos de Barra con TPrinter

Postby cnavarro » Tue Aug 01, 2017 2:09 pm

Image

Habia olvidado el codigo

Code: Select all  Expand view


#include "Fivewin.ch"

REQUEST DBFCDX

Function Main()

   Test()

Return nil


//---------------------
function Test()

   local oDlg
   local oBrw
   local oCust
   local oFontBar
   local oFontBar1
   local oFontBar2

   // If you not install font
   //AddFontResource( ".\Ean-13.ttf" )


   //USE CUSTOMER NEW ALIAS CUST SHARED VIA "DBFCDX"

   DEFINE FONT oFontBar   NAME "EAN-13"  SIZE  00, -36
   DEFINE FONT oFontBar1  NAME "EAN-13"  SIZE  08, -24
   DEFINE FONT oFontBar2  NAME "EAN-13"  SIZE  20, -36

   oCust := TDataBase():Open( nil, "customer.dbf", "DBFCDX" )
   DEFINE DIALOG oDlg SIZE 800,500 TITLE "Test EAN13 Font - " + FWVERSION PIXEL TRUEPIXEL

   @ 60,20 XBROWSE oBrw SIZE -20,-20 PIXEL OF oDlg ;
      DATASOURCE oCust AUTOCOLS AUTOSORT ;  //"CUST"
      CELL LINES NOBORDER

   WITH OBJECT oBrw
      //:lIncrFilter      := .t.
      //:lGetBar          := .t.
      :lSeekBar         := .t.
      :aCols[ 6 ]:oDataFont  := oFontBar1
      AEVal( :aCols, { | o | o:nHeadStrAlign  := AL_CENTER } )
      :CreateFromCode()
   END

   @ 20,20 SAY oBrw:oSeek PROMPT oBrw:cSeek SIZE 300,20 PIXEL OF oDlg COLOR CLR_BLACK,CLR_YELLOW

   ACTIVATE DIALOG oDlg CENTERED

   oFontBar:End()
   oFontBar1:End()
   oFontBar2:End()

   // If you not install font
   //RemoveFontResource( ".\Ean-13.ttf" )

return nil
//-------------

 
Last edited by cnavarro on Tue Aug 01, 2017 5:48 pm, edited 1 time in total.
Cristobal Navarro
Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo
El secreto de la felicidad no está en hacer lo que te gusta, sino en que te guste lo que haces
User avatar
cnavarro
 
Posts: 6500
Joined: Wed Feb 15, 2012 8:25 pm
Location: España

Re: Impresión de Códigos de Barra con TPrinter

Postby karinha » Tue Aug 01, 2017 2:50 pm

Con preview:

http://imgur.com/8KPunIp

Image

Saludos.
João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
User avatar
karinha
 
Posts: 7190
Joined: Tue Dec 20, 2005 7:36 pm
Location: São Paulo - Brasil

Re: Impresión de Códigos de Barra con TPrinter

Postby mastintin » Wed Aug 02, 2017 7:54 am

Al hilo de este post tengo un codigo que puede interesar a alguien ....
Es una función que crea una imagen BMP,JPG,PNG con un codigo Qr , luego esa imagen puede usarse "como guste"

Code: Select all  Expand view



Function QrCodetoBMP( nLineWidth, nLineHeight, cVar, cfileName )   // cVar es el texto que queremos poner en el codigo qr.  
   local oBmp := GDIBmp():new()

   //local hZebra := hb_zebra_create_ean13( "477012345678" )
   LOCAL hZebra := hb_zebra_create_qrcode( cVar )
   LOCAL nFlags
   local nWidth, nHeight
   local hBmp, hGraf
   local hBrush  := GdiPlusNewSolidBrush( 255, 255, 255, 255 )
   local hBrush2 := GdiPlusNewSolidBrush( 255, 0, 0, 255 )

   nLineHeight := nLineWidth

   nWidht  := hb_Zebra_GetWidth ( hZebra, nLineWidth, nLineHeight, nFlags )
   nHeight := hb_Zebra_GetHeight( hZebra, nLineWidth, nLineHeight, nFlags )


   hBmp  := GDIPLUSBMPFROMBRUSH( nWidht + 2, nHeight+2, hBrush )
   hGraf := GDIPLUSHGRAFFROMHBMP( hBmp )

   hb_zebra_draw_gdip( hZebra, hGraf, hBrush2, 1, 1, nLineWidth, nLineHeight )

   oBmp:hBmp := hBmp

   GdiPlusDeleteGraphics( hGraf )
   GdiPlusDeleteBrush( hBrush )
   GdiPlusDeleteBrush( hBrush2 )

   HB_ZEBRA_DESTROY( hZebra )

   oBmp:Save( cFileName )
   oBmp:END()


Return nil

 
User avatar
mastintin
 
Posts: 1516
Joined: Thu May 27, 2010 2:06 pm

Re: Impresión de Códigos de Barra con TPrinter

Postby cnavarro » Wed Aug 02, 2017 9:04 am

Gracias Manuel
Como siempre, poniéndonos al dia
Cristobal Navarro
Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo
El secreto de la felicidad no está en hacer lo que te gusta, sino en que te guste lo que haces
User avatar
cnavarro
 
Posts: 6500
Joined: Wed Feb 15, 2012 8:25 pm
Location: España

Re: Impresión de Códigos de Barra con TPrinter

Postby karinha » Wed Aug 02, 2017 1:31 pm

Masters,

Que me falta?

Code: Select all  Expand view

ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
³ FiveWin for xHarbour 17.01 - Jan. 2017          xHarbour development power ³Ü
³ (c) FiveTech 1993-2017 for Microsoft Windows 9X/NT/200X/ME/XP/Vista/7/8/10 ³Û
ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙÛ
ÿ ßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßß
Compiling...
xHarbour 1.2.3 Intl. (SimpLex) (Build 20170215)
Copyright 1999-2017, http://www.xharbour.org http://www.harbour-project.org/
Compiling 'QRCODE3.prg' and generating preprocessed output to 'QRCODE3.ppo'...


QRCODE3.c:

Error: Unresolved external '_HB_FUN_HB_ZEBRA_GETWIDTH' referenced from C:\FWH1701\SAMPLES\QRCODE3.OBJ
Error: Unresolved external '_HB_FUN_HB_ZEBRA_GETHEIGHT' referenced from C:\FWH1701\SAMPLES\QRCODE3.OBJ
Error: Unresolved external '_HB_FUN_GDIPLUSBMPFROMBRUSH' referenced from C:\FWH1701\SAMPLES\QRCODE3.OBJ
Error: Unresolved external '_HB_FUN_GDIPLUSHGRAFFROMHBMP' referenced from C:\FWH1701\SAMPLES\QRCODE3.OBJ
Error: Unresolved external '_HB_FUN_HB_ZEBRA_DRAW_GDIP' referenced from C:\FWH1701\SAMPLES\QRCODE3.OBJ
Error: Unable to perform link
* Linking errors *
 


Code: Select all  Expand view

#Include "Fivewin.ch"
#Include "hbzebra.ch"

Function Main()

   LOCAL nLineWidth  := 500
   LOCAL nLineHeight := 500
   LOCAL cVar        := "TESTE DE QRCODE COM GDIPLUS"
   LOCAL cfileName   := "QRCODE.BMP"

   QrCodetoBMP( nLineWidth, nLineHeight, cVar, cfileName )

Return Nil

// cVar es el texto que queremos poner en el codigo qr.
Function QrCodetoBMP( nLineWidth, nLineHeight, cVar, cfileName )
 
   local oBmp := GDIBmp():new()
   //local hZebra := hb_zebra_create_ean13( "477012345678" )
   LOCAL hZebra := hb_zebra_create_qrcode( cVar )
   LOCAL nFlags
   local nWidht, nHeight
   local hBmp, hGraf
   local hBrush  := GdiPlusNewSolidBrush( 255, 255, 255, 255 )
   local hBrush2 := GdiPlusNewSolidBrush( 255, 0, 0, 255 )

   nLineHeight := nLineWidth

   nWidht  := hb_Zebra_GetWidth ( hZebra, nLineWidth, nLineHeight, nFlags )
   nHeight := hb_Zebra_GetHeight( hZebra, nLineWidth, nLineHeight, nFlags )


   hBmp  := GDIPLUSBMPFROMBRUSH( nWidht + 2, nHeight+2, hBrush )
   hGraf := GDIPLUSHGRAFFROMHBMP( hBmp )

   hb_zebra_draw_gdip( hZebra, hGraf, hBrush2, 1, 1, nLineWidth, nLineHeight )

   oBmp:hBmp := hBmp

   GdiPlusDeleteGraphics( hGraf )
   GdiPlusDeleteBrush( hBrush )
   GdiPlusDeleteBrush( hBrush2 )

   HB_ZEBRA_DESTROY( hZebra )

   oBmp:Save( cFileName )
   oBmp:END()

Return nil
 


Regards, saludos.
João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
User avatar
karinha
 
Posts: 7190
Joined: Tue Dec 20, 2005 7:36 pm
Location: São Paulo - Brasil

Re: Impresión de Códigos de Barra con TPrinter

Postby mastintin » Wed Aug 02, 2017 7:11 pm

Faltan funciones .... :-(

Code: Select all  Expand view


FUNCTION hb_zebra_draw_gdip( hZebra, hGraf, hBrush, ... )

   hb_zebra_draw( hZebra, {| x, y, w, h |  GDIPLUSDRAWRECT( hGraf,,hbrush,x, y, w, h ) }, ... )

RETURN 0

//------------------------------------------------------------------------------

FUNCTION hb_Zebra_GetWidth ( hZebra, nLineWidth, nLineHeight, iFlags)
*-----------------------------------------------------------------------------------------------*
LOCAL x1:= 0, y1 := 0, nBarWidth := 0, nBarHeight := 0
   // always --> nBarHeight = nLineHeight
   IF hb_zebra_GetError( hZebra ) != 0
      RETURN HB_ZEBRA_ERROR_INVALIDZEBRA
   ENDIF
   hb_zebra_draw ( hZebra, {| x, y, w, h | nBarWidth:=x+w-x1, nBarHeight:=y+h-y1 }, x1, y1, nLineWidth, nLineHeight, iFlags )
RETURN nBarWidth

*-----------------------------------------------------------------------------------------------*
FUNCTION hb_Zebra_GetHeight ( hZebra, nLineWidth, nLineHeight, iFlags)
*-----------------------------------------------------------------------------------------------*
LOCAL x1:= 0, y1 := 0, nBarWidth := 0, nBarHeight := 0
   // always --> nBarHeight = nLineHeight
   IF hb_zebra_GetError( hZebra ) != 0
      RETURN HB_ZEBRA_ERROR_INVALIDZEBRA
   ENDIF
   hb_zebra_draw ( hZebra, {| x, y, w, h | nBarWidth:=x+w-x1, nBarHeight:=y+h-y1 }, x1, y1, nLineWidth, nLineHeight, iFlags )
RETURN nBarHeight

 


Para gdiplus.cpp


Code: Select all  Expand view

HB_FUNC( GDIPLUSDRAWRECT )
{
   Graphics * graphics = ( Graphics * ) hb_parptr( 1 );
   float nLeft   = hb_parnd( 4 );
   float nTop    = hb_parnd( 5 );
   float nWidth  = hb_parnd( 6 );
   float nHeight = hb_parnd( 7 );

    if HB_ISPOINTER( 3 )    // if brush-object
    {
       Brush * brush = ( Brush * ) hb_parptr( 3 );
       graphics->FillRectangle( brush, nLeft, nTop, nWidth, nHeight );
    }

    if HB_ISPOINTER( 2 )    //if pen-object
    {
       Pen * pen = ( Pen * ) hb_parptr( 2 );

       graphics->DrawRectangle( pen, nLeft, nTop, nWidth, nHeight );
    }
}

HB_FUNC( GDIPLUSBMPFROMBRUSH )
{

  int nWidth =  hb_parni( 1 );
  int nHeight = hb_parni( 2 );

  Brush * brush = ( Brush * ) hb_parptr( 3 );
  Bitmap * newImage = new Bitmap(nWidth, nHeight );

  Graphics * g =  new Graphics( newImage );
  g->FillRectangle( brush, 0, 0, nWidth, nHeight );

  delete g ;
  //delete brush ;
  hb_retptr( newImage );

}

HB_FUNC( GDIPLUSHGRAFFROMHBMP)
{
   Bitmap * newImage = ( Bitmap * ) hb_parptr( 1 );
   Graphics * graphics = new Graphics( newImage );
   hb_retptr( graphics );
}

 
User avatar
mastintin
 
Posts: 1516
Joined: Thu May 27, 2010 2:06 pm

Re: Impresión de Códigos de Barra con TPrinter

Postby devtuxtla » Wed Aug 02, 2017 9:17 pm

Hola Mastintin

Es posible emitir del BMP del codigo QR en memoria ?

Es decir, no escribirla en disco. El motivo es que casi siempre se adiciona a un documento, y se tiene que hacer tres operaciones una e escritura del QR, otra de lectura del mismo y una mas de escritura con el docuemento que al final se adiciona. (creo que es mucho tiempo de proceso para un codigo QR).

Saludos
Visite Chiapas, el paraiso de México.
devtuxtla
 
Posts: 392
Joined: Tue Jul 29, 2008 1:55 pm

Re: Impresión de Códigos de Barra con TPrinter

Postby mastintin » Thu Aug 03, 2017 8:20 am

devtuxtla wrote:Hola Mastintin

Es posible emitir del BMP del codigo QR en memoria ?

Es decir, no escribirla en disco. El motivo es que casi siempre se adiciona a un documento, y se tiene que hacer tres operaciones una e escritura del QR, otra de lectura del mismo y una mas de escritura con el docuemento que al final se adiciona. (creo que es mucho tiempo de proceso para un codigo QR).

Saludos


Si es posible :-)
pongo una variante de la misma funcion .... si le pasas el nombre del archivo de salida se graba y devuelve un hbitmap .... ojo luego destruir el hbitmap corre de tu cuenta .

Code: Select all  Expand view



Function QrCodetoBMP( nLineWidth, nLineHeight, cVar, cfileName )   // cVar es el texto que queremos poner en el codigo qr.  
   local oBmp := GDIBmp():new()

   //local hZebra := hb_zebra_create_ean13( "477012345678" )
   LOCAL hZebra := hb_zebra_create_qrcode( cVar )
   LOCAL nFlags
   local nWidth, nHeight
   local hBmp, hGraf
   local hBrush  := GdiPlusNewSolidBrush( 255, 255, 255, 255 )
   local hBrush2 := GdiPlusNewSolidBrush( 255, 0, 0, 255 )

   local  hBitmap    

   nLineHeight := nLineWidth

   nWidht  := hb_Zebra_GetWidth ( hZebra, nLineWidth, nLineHeight, nFlags )
   nHeight := hb_Zebra_GetHeight( hZebra, nLineWidth, nLineHeight, nFlags )


   hBmp  := GDIPLUSBMPFROMBRUSH( nWidht + 2, nHeight+2, hBrush )
   hGraf := GDIPLUSHGRAFFROMHBMP( hBmp )

   hb_zebra_draw_gdip( hZebra, hGraf, hBrush2, 1, 1, nLineWidth, nLineHeight )

   oBmp:hBmp := hBmp

   GdiPlusDeleteGraphics( hGraf )
   GdiPlusDeleteBrush( hBrush )
   GdiPlusDeleteBrush( hBrush2 )

   HB_ZEBRA_DESTROY( hZebra )

   if !Empty( cfileName )
       obmp:Save( cFileName )  
   endif
   hBitmap := oBmp:GetGDIhBitmap()
   oBmp:END()

Return hbitmap


 
User avatar
mastintin
 
Posts: 1516
Joined: Thu May 27, 2010 2:06 pm

Re: Impresión de Códigos de Barra con TPrinter

Postby hmpaquito » Thu Aug 03, 2017 2:31 pm

karinha wrote:
hmpaquito wrote:Hablando de impresion de codigo de barras,

Hace unos meses me topé con una impresora térmica. Utilicé la librería BarLib de Cayetano, pero no imprimía nada. En cambio desde Word si imprimía sin ningun tipo de problema o configuración especial...


Cual és la impresora térmica?

Saludos.



Godex G500
hmpaquito
 
Posts: 1482
Joined: Thu Oct 30, 2008 2:37 pm

Re: Impresión de Códigos de Barra con TPrinter

Postby karinha » Thu Aug 03, 2017 8:14 pm

gracias Masters, no logro hacer funcionar.

Code: Select all  Expand view

C:\QRCODE3>Set hdir=C:\XHBBCC72

C:\QRCODE3>Set bcdir=C:\bcc72

C:\QRCODE3>Set fwhdir=C:\FwH1701

C:\QRCODE3>rem @If Exist *.Obj      Del *.Obj

C:\QRCODE3>If Exist GASFW.Exe Del GASFW.Exe

C:\QRCODE3>REM -> Area dos Arquivos com ExtensÆo *.PRG Gerados em FiveWin

C:\QRCODE3>C:\XHBBCC72\bin\harbour QRCODE3       /m/n /iC:\FwH1701\include;C:\XHBBCC72\include;C:\bcc72\include /w0 /p   1>Erro.log

C:\QRCODE3>C:\bcc72\bin\bcc32 -M -c -v -O2 -eQRCODE3.exe -IC:\XHBBCC72\include -IC:\bcc72\include QRCODE3.C       1>>Erro.log

C:\QRCODE3>rem hdir=C:\XHBBCC72

C:\QRCODE3>C:\bcc72\bin\bcc32 -M -c -v -O2 -IC:\XHBBCC72\include gdipfwh.cpp                                     1>>Erro.log

C:\QRCODE3>If ErrorLevel 1 Type Erro.log   | More
xHarbour 1.2.3 Intl. (SimpLex) (Build 20170215)
Copyright 1999-2017, http://www.xharbour.org http://www.harbour-project.org/
Compiling 'QRCODE3.prg' and generating preprocessed output to 'QRCODE3.ppo'...
Done.

Lines 172, Functions/Procedures 6, pCodes 525
Embarcadero C++ 7.20 for Win32 Copyright (c) 1993-2016 Embarcadero Technologies, Inc.
QRCODE3.c:
Embarcadero C++ 7.20 for Win32 Copyright (c) 1993-2016 Embarcadero Technologies, Inc.
GDIPFWH.CPP:
Warning W8022 c:\bcc72\include\windows\sdk\GdiplusHeaders.h 650: 'Bitmap::Clone(const Rect &,int)' hides virtual function 'Image::Clone()'
Error E2268 GDIPFWH.CPP 955: Call to undefined function 'hb_parvni' in function HB_FUN_GDIP_FILLRECT()
Error E2268 GDIPFWH.CPP 1004: Call to undefined function 'hb_parvnd' in function HB_FUN_GDIP_DRAWTEXT()
*** 2 errors in Compile ***


C:\QRCODE3>If ErrorLevel 1 Goto Exit

C:\QRCODE3>REM C:\bcc72\bin\bcc32 -M -c -O2 -eQRCODE3.exe -IC:\XHBBCC72\include QRCODE3.c

C:\QRCODE3>C:\bcc72\bin\ilink32 -Gn -aa -Tpe -s @Cx.Lnk
Turbo Incremental Link 6.75 Copyright (c) 1997-2016 Embarcadero Technologies, Inc.
Fatal: Unable to open file 'GDIPFWX.OBJ'
 


Regards, saludos.
João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
User avatar
karinha
 
Posts: 7190
Joined: Tue Dec 20, 2005 7:36 pm
Location: São Paulo - Brasil

PreviousNext

Return to FiveWin para Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 14 guests