Amigos,
estoy necesitando un peque帽o ejemplo de impresi贸n de c贸digos de barra con TPrinter
y no puedo encontrar nada.
Desde ya mil gracias!
Roberto
Amigos,
estoy necesitando un peque帽o ejemplo de impresi贸n de c贸digos de barra con TPrinter
y no puedo encontrar nada.
Desde ya mil gracias!
Roberto
Hola. P谩same un mail y te mando algo. Un saludo.
Eloy
r_viotti@hotmail.com
Muchas gracias!
Roberto
DEFINE FONT oFontB NAME "3 of 9 barcode" SIZE 0, -30 OF oPrnoPrn:CmSay( Fila, Columna, "n煤mero para el c贸digo de barras",oFontB )#DEFINE HKEY_LOCAL_MACHINE 聽(0x80000002)
/*------------------------------------------------------------------------------*/
Function CheckBarCode( lInstall )
/*------------------------------------------------------------------------------*/
/* Funcion principal para instalar el FONT 3of9Barcode en el sistema 聽 聽 聽 聽 聽 聽*/
/*------------------------------------------------------------------------------*/
聽 聽local cWinFontsFolder, cFontFile, oFontBarCode
聽 聽local cKey, oReg
聽 聽if lInstall == nil
聽 聽 聽 lInstall := .t.
聽 聽endif
聽 聽cKey := "Software\Microsoft\Windows NT\CurrentVersion\Fonts"
聽 聽oReg := TReg32():New( HKEY_LOCAL_MACHINE, cKey )
聽 聽// need name of font to install here
聽 聽cFontFile 聽:= oReg:Get( '3 of 9 Barcode (TrueType)' )
聽 聽oReg:Close()
聽 聽lIsBarcode := !empty( cFontFile )
聽 聽if .not. lIsBarCode .and. lInstall
聽 聽 聽 InstallBarCode()
聽 聽 聽 cFontFile 聽:= oReg:Get( '3 of 9 Barcode (TrueType)' )
聽 聽 聽 oReg:Close()
聽 聽 聽 lIsBarcode := !empty( cFontFile )
聽 聽endif
return( lIsBarcode)
/*------------------------------------------------------------------------------*/
STATIC Function InstallBarCode()
/*------------------------------------------------------------------------------*/
/* Funcion para instalar el FONT 3of9Barcode en el sistema 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽*/
/*------------------------------------------------------------------------------*/
聽 聽local cWindowsDir
聽 聽local oShellApplication
聽 聽local oShell
聽 聽local oShellFSO
聽 聽local cFontFile
聽 聽local cFontDir
聽 聽local cWinFontsFolder
聽 聽cWindowsDir := gete( "systemroot" )
聽 聽oShell = CreateObject("Shell.Application")
聽 聽oShellApplication := CreateObject( "Shell.Application" )
聽 聽oShell 聽 聽 聽 聽 聽 聽:= TOleAuto():New( "WScript.Shell" )
聽 聽oShellFSO 聽 聽 聽 聽 := TOleAuto():New( "Scripting.FileSystemObject" )
聽 聽/* cFontDir 聽 聽 聽 聽 聽:= 'c:\jll1109\psitaconta\fonts' 聽 聽 聽 聽 聽 聽 聽*/
聽 聽/* La carpeta origen del FONT en donde se ejecuta el programa + la */
聽 聽/* carpeta "FONTS" 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 */
聽 聽cFontDir 聽 := cFilePath( GetModuleFileName( GetInstance() ) ) + "Fonts"
聽 聽cFontFile 聽:= '3of9.ttf'
聽 聽oNameSpace := oShellApplication:Namespace( cFontDir )
聽 聽oFont 聽 聽 聽:= oNameSpace:ParseName( cFontFile )
聽 聽oFont:InvokeVerb("Install")
Return NILMuchas Gracias.
Alguien dispone de un font que funcione para imprimir EAN13, y que sea FREE?
No la encuentro
Joao conozco muy bien el gran trabajo de Cayetano y la libreria hb_zebra es otra posibilidad
Pero necesito para hacer unas pruebas un Font de Ean13
Gracias
Joao, gracias
Esto si puede servirme, mas tarde te lo confirmo
Joao, gracias
SOLUCIONADO
Maestro, va a poner un ejemplo?
Regards, saludos.
#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"
聽 聽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 "Test" 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
聽 聽 聽 @ 080, 100 SAY oSay1 PROMPT cCode PIXEL FONT oFontText1 SIZE 100, 40
聽 聽 聽 @ 160, 100 SAY oSay2 PROMPT cCode PIXEL FONT oFontBar 聽 SIZE 200, 60
聽 聽 聽 @ 240, 100 SAY oSay2 PROMPT cCode PIXEL FONT oFontBar1 聽SIZE 200, 60
聽 聽ACTIVATE WINDOW oWnd
聽 聽oFontText1:End()
聽 聽oFontBar:End()
聽 聽oFontBar1:End()
Return NIL