Message not found: TPRINTER:_LUSEHARUPDF

Post Reply
User avatar
noe aburto
Posts: 418
Joined: Wed Nov 26, 2008 6:33 pm
Location: Morelia, Mich. Mexico.

Message not found: TPRINTER:_LUSEHARUPDF

Post by noe aburto »

Saludos

Tratando de generar archivos PDF, hago esto:

Code: Select all | Expand

REQUEST FWHARU ////////////////////////////////////////////////////////////////////////////static Principal,PantRecimemvar _arcfield num_rec,imp_rec,ben_rec,con_re1,con_re2,sit_rec,fec_recfunction Main(cOtros)Imprimir(nOpc)return NILfunction Imprimir(nOpc)local nIni,nFin,bPant,n,nR,nC,nReg:=RecNo(),nOrdAnt:=OrdSetFocus(),nAncho,oPrn,oFont,nSupif nOpc==1 if sit_rec=='C'  return aviso('El recibo fue cancelado') endif nIni:=Val(num_rec) nFin:=Val(num_rec)else nIni:=Val(num_rec) DBGoBottom() nFin:=Val(num_rec) bPant:=AbreVent(0,0,4,52,'Impresión de recibos') @ 1, 2 say 'Recibo inicial' get nIni picture '99999999' @ 1,28 say 'Recibo final' get nFin picture '99999999';        valid {||nFin>=nIni} if !aDialogo(NIL,.t.)  DBGoTo(nReg)  return NIL endifendifOrdSetFocus(1)TPrinter():lUseHaruPdf:=.t.       //////////////////////////////////////////////////////////////////////////////inicia impresion en oPrn previo // este es el PRINTER if oPrn==NIL DBGoTo(nReg) return NILendifselecciona hoja 1 en oPrninicia paginanAncho:=132DEFINE FONT oFont NAME "ARIAL" SIZE 0,-26 BOLDnSup:=0for n:=nIni to nFin if !DBSeek(Ceros(n,8))  loop endif @ LINEA nSup+1,08,nSup+21,138 caja en oPrn if File('C:\AUTOSYS\DATOS\ARREND\001\RECIBOS.BMP')  nR:=1+(nSup*CML)  nC:=2  oPrn:Cmtr2Pix(@nR,@nC)  oPrn:SayImage(nR,nC,'C:\AUTOSYS\DATOS\ARREND\001\RECIBOS.BMP',PosX(2,oPrn),PosY(2,oPrn)) endif @ nSup+ 2, 0 dato 'KARLA AIDE HERRERA PULIDO' titulo 3,80 en oPrn @ nSup+ 3, 0 dato 'RECIBO DE ARRENDAMIENTO' titulo 1,80 en oPrn @ nSup+ 3,65 dato 'RECIBO NO. '+AllTrim(Str(Val(num_rec),8)) letra normal negrilla en oPrn if sit_rec=='C'  @ nSup+ 4,63 dato 'CANCELADO' en oPrn endif @ nSup+ 7,60 dato 'BUENO POR $'+tran(imp_rec,'@Z 9999,999.99') letra normal negrilla en oPrn @ LINEA nSup+10,19,nSup+10,132 en oPrn if imp_rec>0  @ nSup+ 9,10 dato 'RECIBI DE        '+ben_rec letra condensada en oPrn else  @ nSup+ 9,10 dato 'RECIBI DE' letra condensada en oPrn endif @ LINEA nSup+12,26,nSup+12,132 en oPrn if imp_rec>0  @ nSup+11,10 dato 'LA CANTIDAD DE $        ('+Upper(DescNum(imp_rec))+')' en oPrn else  @ nSup+11,10 dato 'LA CANTIDAD DE $' en oPrn endif @ LINEA nSup+14,27,nSup+14,132 en oPrn if imp_rec>0  @ nSup+13,10 dato 'POR CONCEPTO DE        '+con_re1 en oPrn else  @ nSup+13,10 dato 'POR CONCEPTO DE' en oPrn endif @ LINEA nSup+16,25,nSup+16,132 en oPrn if imp_rec>0  @ nSup+15,10 dato 'LUGAR Y FECHA        MORELIA, MICHOACAN, A '+FormaFecha(fec_rec,.t.) en oPrn*  @ nSup+15,10 dato 'LUGAR Y FECHA        '+_CIUDAD+', '+_ESTADO+', A '+FormaFecha(fec_rec,.t.) en oPrn else  @ nSup+15,10 dato 'LUGAR Y FECHA' en oPrn endif @ nSup+18,0 dato 'R E C I B I' titulo 0,80 en oPrn @ LINEA nSup+20,31,nSup+20,51 NORMAL en oPrn @ nSup+22, 10 dato '-' en oPrn @ nSup+22,130 dato '-' en oPrn nSup+=22 if nSup>=66  termina pagina  inicia pagina  nSup:=0 endifnexttermina paginatermina impresionOrdSetFocus(nOrdAnt)DBGoTo(nReg)DespVent(PantReci)return NIL 


y me da este error:

Path and name: I:\arrend\ARREND.exe (32 bits)
Size: 8,014,336 bytes
Compiler version: Harbour 3.2.0dev (r1803161710)
FiveWin Version: FWH 20.06
Windows version: 10.0, Build 19042

Time from start: 0 hours 0 mins 5 secs
Error occurred at: 08/12/2020, 14:16:35
Error description: Error BASE/1005 Message not found: TPRINTER:_LUSEHARUPDF
Args:
[ 1] = O TPRINTER

Stack Calls
===========
Called from: => __ERRRT_SBASE( 0 )
Called from: ../../../tobject.prg => TPRINTER:ERROR( 0 )
Called from: ../../../tobject.prg => (b)HBOBJECT( 0 )
Called from: ../../../tobject.prg => TPRINTER:MSGNOTFOUND( 0 )
Called from: ../../../tobject.prg => TPRINTER:_LUSEHARUPDF( 0 )
Called from: ARREND.PRG => IMPRIMIR( 209 )
Called from: ARREND.PRG => (b)RECMOVI( 103 )
Called from: .\source\classes\MENU.PRG => TMENU:COMMAND( 1556 )
Called from: .\source\classes\DIALOG.PRG => TDIALOG:COMMAND( 390 )
Called from: => TWINDOW:HANDLEEVENT( 0 )
Called from: .\source\classes\DIALOG.PRG => TDIALOG:HANDLEEVENT( 1136 )
Called from: => DIALOGBOXINDIRECT( 0 )
Called from: .\source\classes\DIALOG.PRG => TDIALOG:ACTIVATE( 304 )
Called from: MAUVENT.PRG => PROCFOLD( 2133 )
Called from: ARREND.PRG => RECMOVI( 130 )
Called from: ARREND.PRG => (b)MAIN( 62 )
Called from: .\source\classes\MENU.PRG => TMENU:COMMAND( 1556 )
Called from: .\source\classes\WINDOW.PRG => TWINDOW:COMMAND( 1141 )
Called from: => TWINDOW:HANDLEEVENT( 0 )
Called from: .\source\classes\WINDOW.PRG => _FWH( 3559 )
Called from: => WINRUN( 0 )
Called from: .\source\classes\WINDOW.PRG => TWINDOW:ACTIVATE( 1097 )
Called from: ARREND.PRG => MAIN( 72 )
Noé Aburto Sánchez
Tec. Prog. de Sistemas. -Morelia, Mich. México.
fwh 20.06, Harbour 3.2.0, bcc 7.4
TsBrowse 9.0, TsButton 7.0, xEdit 6.1
naburtos@gmail.com, noeaburto67@hotmail.com
User avatar
karinha
Posts: 8057
Joined: Tue Dec 20, 2005 7:36 pm
Location: São Paulo - Brasil
Been thanked: 10 times
Contact:

Re: Message not found: TPRINTER:_LUSEHARUPDF

Post by karinha »

João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
User avatar
noe aburto
Posts: 418
Joined: Wed Nov 26, 2008 6:33 pm
Location: Morelia, Mich. Mexico.

Re: Message not found: TPRINTER:_LUSEHARUPDF

Post by noe aburto »

Respondiendo a mi problema....

si este programa que lo copie del foro, lo compilo con buildh.bat de \fwh\samples lo ejecuta sin errores:

Code: Select all | Expand

#include "fivewin.ch"#include "report.ch"REQUEST FWHARUfunction Main()   local oPrn, oFont, oPen   local cPdfFile   TPrinter():lUseHaruPDF  := .t.   cPdfFile := "test.pdf"   PRINT oPrn PREVIEW FILE cPdfFile   DEFINE FONT oFont NAME "ARIAL" SIZE 0,-20 OF oPrn   DEFINE PEN oPen WIDTH 1 OF oPrn   PAGE   oPrn:RoundBox( 3, 2.5, 9, 12.5, 1, 1, oPen, CLR_YELLOW, nil, "CM" )   oPrn:Say( 4, 2.5,   "Left at 4 cm",     oFont, 10, nil, nil, 0, "CM" )   oPrn:Say( 5, 2.5,   "Right at 5 cm",    oFont, 10, nil, nil, 1, "CM" )   oPrn:Say( 6, 2.5,   "Centered at 6 cm", oFont, 10, nil, nil, 2, "CM" )   oPrn:Say( 3, 0.984, "Left at 3 inches", oFont, 10, nil, nil, 0, "INCHES" )   ENDPAGE   ENDPRINT   RELEASE FONT oFont   RELEASE PEN  oPenreturn nil 


Mi problema:

declaro despues del "fivewin.ch'

REQUEST FWHARU

y antes del PRINTER

TPrinter():lUseHaruPDF := .t.

PRINT oPrn PREVIEW FILE 'test.pdf'

pero me marca el error previamente mandado

===========
Called from: => __ERRRT_SBASE( 0 )
Called from: ../../../tobject.prg => TPRINTER:ERROR( 0 )
Called from: ../../../tobject.prg => (b)HBOBJECT( 0 )
Called from: ../../../tobject.prg => TPRINTER:MSGNOTFOUND( 0 )
Called from: ../../../tobject.prg => TPRINTER:_LUSEHARUPDF( 0 )
Called from: ARREND.PRG => IMPRIMIR( 209 )

Cabe aclarar que lo compilo con xEdit 6.1, no se si deba quitar o aumentar los flags en xEdit:
Tengo:

Compilador xBase
/n

Compilador de C
-tWM -c -v- -O2 -X

Enlazador
-Gn -Tpe
Noé Aburto Sánchez
Tec. Prog. de Sistemas. -Morelia, Mich. México.
fwh 20.06, Harbour 3.2.0, bcc 7.4
TsBrowse 9.0, TsButton 7.0, xEdit 6.1
naburtos@gmail.com, noeaburto67@hotmail.com
User avatar
nageswaragunupudi
Posts: 10733
Joined: Sun Nov 19, 2006 5:22 am
Location: India
Been thanked: 11 times
Contact:

Re: Message not found: TPRINTER:_LUSEHARUPDF

Post by nageswaragunupudi »

It appears you are linking an older version of printer.prg with your application. Please check your link script and remove it.
Regards

G. N. Rao.
Hyderabad, India
User avatar
noe aburto
Posts: 418
Joined: Wed Nov 26, 2008 6:33 pm
Location: Morelia, Mich. Mexico.

Re: Message not found: TPRINTER:_LUSEHARUPDF

Post by noe aburto »

Gracias.

Ya solucionado el problema de generar PDF, como lo sugirieron, lo omití de la lib general que uso, pro no entiendo porque, se supone que la clase tPrinter que viene en \sourse de fwh es la misma que viene en FIveC o FiveH

Entonces que haremos si personalmente necesitamos una modificacion a la una clase?
Noé Aburto Sánchez
Tec. Prog. de Sistemas. -Morelia, Mich. México.
fwh 20.06, Harbour 3.2.0, bcc 7.4
TsBrowse 9.0, TsButton 7.0, xEdit 6.1
naburtos@gmail.com, noeaburto67@hotmail.com
User avatar
Antonio Linares
Site Admin
Posts: 42833
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Has thanked: 157 times
Been thanked: 121 times
Contact:

Re: Message not found: TPRINTER:_LUSEHARUPDF

Post by Antonio Linares »

Noé,

El código fuente que se proporciona con FWH es la versión más reciente.

Parece que por alguna razón estabas enlazando una versión más antigua.

Revisa que no estés usando un printer.prg modificado tuyo.
regards, saludos

Antonio Linares
www.fivetechsoft.com
Post Reply