- Code: Select all Expand view
\source\function\IMGTXTIO.PRG
https://www.forums.fivetechsupport.com/viewtopic.php?f=3&t=39585#p263522
Regards, saludos.
\source\function\IMGTXTIO.PRG
pedroluis wrote:Hola amigos !
Como puedo solucionar la impresión de un código de barras
que saqué de barlib.zip de libre distribución,
que tiene el programa go_code.prg y que me da error al
querer imprimir al usar la función FILLRECT().
Gracias, como siempre !
Compiler version: xHarbour 1.2.3 Intl. (SimpLex) (Build 20221118)
FiveWin version: FWH 23.07
C compiler version: Borland/Embarcadero C++ 7.4 (32-bit)
Windows 10 64 Bits, version: 6.2, Build 9200
Error description: Warning BASE/1004 Message not found: FWPDF:FILLRECT
Stack Calls
===========
Called from: source\rtl\tobject.prg => FWPDF:ERROR( 0 )
Called from: source\rtl\tobject.prg => FWPDF:MSGNOTFOUND( 0 )
Called from: source\rtl\tobject.prg => FWPDF:FILLRECT( 0 )
Called from: go_code.prg => GO_CODE( 38 )
Called from: barlib.prg => CODE128( 34 )
Called from: barlib.prg => C_CODE128( 39 )
TPrinter():lUseHaruPDF := .F.
PRINT oPrn FILE cPdf
#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
#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
@ 1.00,7.50 PRINT TO oPrn TEXT "Address :" + CRLF + cName + CRLF + cCity + CRLF + cCountry + CRLF + cItem ;
AS BARCODE TYPE "QR-CODE" SIZE 0.5,0.5 INCHES // Mas chico
@ 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
@ 3.5, 5.2 PRINT TO oPrn TEXT cName AS BARCODE TYPE "CODE128" SIZE 1.2,0.3 INCHES //Mas chico
@ 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
@ 6.0, 5.2 PRINT TO oPrn TEXT cItem AS BARCODE TYPE "EAN13" SIZE 0.5,0.2 INCHES //Mas chico
ENDPAGE
ENDPRINT
RELEASE FONT oFont
return nil
1) En mi programa tengo 17 fonts distintos, y cuando imprime el código de barras realmente no se cuál toma y no se como definirle uno determinado.
2) En el SIZE <nWidth>, si pongo un valor menor que 4, queda igual. No se achica. El BARSIZE <nSize> no funciona. Me da error de compilación.
.. SIZE nWidth, nHeight UNITS INCHES/CM/MM
#include "fivewin.ch"
REQUEST FWZEBRA
REQUEST FWHARU
function Main()
local cName, cCity, cCountry, cItem, cItem2
local oPrn, oFont, oFont1
cName := "Antonio Linares"
cCity := "Marbella"
cCountry := "Spain"
cItem := "100003222186321900"
cItem2 := "30634973938A00030000322274188595079486"
TPrinter():lUseHaruPDF := .t.
PRINT oPrn PREVIEW FILE "barcode.pdf"
DEFINE FONT oFont NAME "TAHOMA" SIZE 0,-14 OF oPrn
DEFINE FONT oFont1 NAME "TAHOMA" SIZE 0,-07 OF oPrn
PAGE
@ 1.00, 1 PRINT TO oPrn TEXT cName SIZE 4, 0.3 CM FONT oFont
@ 2.00, 1 PRINT TO oPrn TEXT cCity SIZE 4, 0.3 CM FONT oFont
@ 3.00, 1 PRINT TO oPrn TEXT cCountry SIZE 4, 0.3 CM FONT oFont
@ 4.00, 1 PRINT TO oPrn TEXT cItem SIZE 4, 0.3 CM FONT oFont
@ 5.0, 1 PRINT TO oPrn TEXT cItem SIZE 7.5, 3 CM FONT oFont1
@ 5.0, 9 PRINT TO oPrn TEXT cItem AS BARCODE TYPE "CODE128" SIZE 4,1 CM
@ 7.5, 1 PRINT TO oPrn TEXT cItem2 SIZE 7.5, 3 CM FONT oFont1
@ 7.5, 9 PRINT TO oPrn TEXT cItem2 AS BARCODE TYPE "CODE128" SIZE 8.5,1 CM
ENDPAGE
ENDPRINT
RELEASE FONT oFont
return nil
pedroluis wrote:Hola amigo !
El tema es que el primero quiero que me quede de un tamaño de 4 cmts. y el segundo de 8,5 una vez impresos,
y eso es lo que no logro.
pedroluis wrote:Hola amigo !
El tema es que el primero quiero que me quede de un tamaño de 4 cmts. y el segundo de 8,5 una vez impresos,
y eso es lo que no logro.
#include "fivewin.ch"
REQUEST FWZEBRA
REQUEST FWHARU
//----------------------------------------------------------------------------//
function Main()
local cItem1 := "100003222186321900"
local cItem2 := "30634973938A00030000322274188595079486"
local oPrn, oPen, oFont
TPrinter():lUseHaruPDF := .F. // Not using HaruPDF
PRINT oPrn PREVIEW FILE "barcode.pdf"
DEFINE FONT oFont NAME "TAHOMA" SIZE 0,-14 OF oPrn
DEFINE PEN oPen WIDTH 1 COLOR CLR_HRED OF oPrn
PAGE
@ 3, 2 PRINT TO oPrn TEXT cItem1 SIZE 10,1 CM FONT oFont
oPrn:Lines( { { 4, 2 }, { 4, 6 }, { 4.4, 6 } }, oPen, "CM" )
@ 4.5, 2 PRINT TO oPrn TEXT cItem1 AS BARCODE TYPE "CODE128" SIZE 4,1 CM
@ 10, 2 PRINT TO oPrn TEXT cItem2 SIZE 20,1 CM FONT oFont
oPrn:Lines( { { 11, 2 }, { 11, 10.5 }, { 11.4, 10.5 } }, oPen, "CM" )
@ 11.5, 2 PRINT TO oPrn TEXT cItem2 AS BARCODE TYPE "CODE128" SIZE 8.5,1 CM
ENDPAGE
ENDPRINT
RELEASE FONT oFont
return nil
Return to FiveWin para Harbour/xHarbour
Users browsing this forum: No registered users and 46 guests