FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin para Harbour/xHarbour Marca de Agua con TPrinter
Posts: 470
Joined: Fri Feb 05, 2010 11:30 AM
Marca de Agua con TPrinter
Posted: Thu Aug 08, 2024 07:24 PM

Hola amigos!

Necesito imprimir una marca de agua en un documento hecho con TPrinter,

he probado de varias formas y no obtengo el resultado deseado, se puede

hacer??

Muchas gracias!

Roberto

Univ@c I.S.I.
Desarrolladores de Software
http://www.elcolegioencasa.ar
Posts: 1344
Joined: Wed Nov 16, 2005 09:14 PM
Re: Marca de Agua con TPrinter
Posted: Thu Aug 08, 2024 09:35 PM
Roberto, si se puede.
Incluso en la nueva version de Fivewin, Mr Rao a solucionado para la generación del PDF con marca de agua para que salga perfecto.
Te dejo un ejemplo
Code (fw): Select all Collapse
#include "Fivewin.ch"

*****************************************************************************
*** Imprimir con marca de agua
*******************************************
FUNCTION Main()
LOCAL oPrn, nRow, oFont, oFont3, y, i

   DEFINE FONT oFont3  NAME "ARIAL"       SIZE 25,25*2.5
   DEFINE FONT oFont   NAME "CALIBRI"     SIZE 25*1.5,25*3 BOLD           
   PRINT oPrn NAME "Roberto " PREVIEW MODAL
     oPrn:SetPortrait()
     oPrn:SetPage(9)
     PAGE    
       @ 0,0 PRINT TO oPrn IMAGE "fondo.jpg" SIZE oPrn:nHorzRes(), oPrn:nVertRes() PIXEL STRETCH GRAY
       
       @ 5.5, 1   PRINT TO oPrn TEXT "C.U.I.T.:" ;
                SIZE 3,.5 CM FONT oFont3 ALIGN "R"
       @ 5.5, 4.1 PRINT TO oPrn TEXT "20-21442466-6" ;
                SIZE 6,.5 CM FONT oFont ALIGN "L"
       @ 5.5, 9.5  PRINT TO oPrn TEXT "Razon Social:" ;
                SIZE 2.5,.5 CM FONT oFont3 ALIGN "R"
       @ 5.5, 12.5 PRINT TO oPrn TEXT "Roberto" ;
                SIZE 8,1 CM FONT oFont LASTROW nRow  
       @ 6,1  PRINT TO oPrn TEXT "Condicion IVA:" ;
                SIZE 3,.5 CM FONT oFont3 ALIGN "R"
       @ 6,4.1 PRINT TO oPrn TEXT "Responsable Monotributo" ;
                SIZE 6,.5 CM FONT oFont ALIGN "L"
       nRow := IF(nRow<6,6,nRow)
       @ nRow, 9.5 PRINT TO oPrn TEXT "Direccion:" ;
                SIZE 2.5,.5 CM FONT oFont3 ALIGN "R"
       @ nRow, 12.5 PRINT TO oPrn TEXT "Domicilio de Roberto" ;
                SIZE 8,1 CM FONT oFont  
       @ 6.5, 01 PRINT TO oPrn TEXT "Condicion venta:" ;
                SIZE 3,.5 CM FONT oFont3 ALIGN "R"
       @ 6.5, 4.1 PRINT TO oPrn TEXT "Contado" ;
                SIZE 6,.5 CM FONT oFont ALIGN "L"
       @ 7, 01 PRINT TO oPrn TEXT "Forma de pago:" ;
                SIZE 3,.5 CM FONT oFont3 ALIGN "R"
       @ 7, 4.1 PRINT TO oPrn TEXT "Contado" ;
                SIZE 6,.5 CM FONT oFont ALIGN "L"
       

       @ 8.2, 0.7 PRINT TO oPrn TEXT "Codigo" ;
                SIZE 2.5,.9 CM FONT oFont3 ALIGN "L"
       @ 8.2, 3.5 PRINT TO oPrn TEXT "Descripcion del producto" ;
                SIZE 6.5,.9 CM FONT oFont3 ALIGN "L"
       @ 8.2, 10 PRINT TO oPrn TEXT "Cantidad" ;
                SIZE 2,.9 CM FONT oFont3 ALIGN "R"                           
       y := 9.2
       FOR i = 1 TO 10
           @ y, 01 PRINT TO oPrn TEXT "123-"+STR(i,2) ;
                    SIZE 2.5,.5 CM FONT oFont ALIGN "TL"
           @ y, 03.5 PRINT TO oPrn TEXT "Producto"+STR(i,2) ;
                SIZE 6.5,2.5 CM FONT oFont LASTROW nRow ALIGN "TL"
           @ y, 10 PRINT TO oPrn TEXT STR(i,08,2) ;
                SIZE 2,.5 CM FONT oFont ALIGN "TR"
           y := nRow     
           
        NEXT       
        
     ENDPAGE
   
   ENDPRINT
           
RETURN nil
Posts: 470
Joined: Fri Feb 05, 2010 11:30 AM
Re: Marca de Agua con TPrinter
Posted: Fri Aug 09, 2024 11:45 AM

Gracias César por responder!

Hice esas pruebas, y en pantalla sale perfecto. Pero, cuando sale impresa,

la marca de agua sale con un fondo negro del tamaño del Png, como si fuera

una sombra.

Como se podrá solucionar esto?

Muchas gracias..

Univ@c I.S.I.
Desarrolladores de Software
http://www.elcolegioencasa.ar
Posts: 1344
Joined: Wed Nov 16, 2005 09:14 PM
Re: Marca de Agua con TPrinter
Posted: Fri Aug 09, 2024 12:09 PM

Roberto:

Efectivamente no habia probado la impresión directa a una laser.

Sale como vos dijiste

Esperemos que Mr. Rao pueda darnos una pista

Posts: 8515
Joined: Tue Dec 20, 2005 07:36 PM
Re: Marca de Agua con TPrinter
Posted: Fri Aug 09, 2024 12:39 PM
Cesar, e asi?
Code (fw): Select all Collapse
       @ 6.5, 5 PRINT TO oPrn IMAGE "FONDO.JPG" SIZE 2.5, 5 INCHES ALIGN ""   ;
          STRETCH GRAY ALPHALEVEL 150
https://forums.fivetechsupport.com/viewtopic.php?f=6&t=44611&start=30&sid=eb9291f68349ce952884e6b160f5313c#p271884

Regards, saludos.
João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
Posts: 1344
Joined: Wed Nov 16, 2005 09:14 PM
Re: Marca de Agua con TPrinter
Posted: Fri Aug 09, 2024 03:22 PM
karinha wrote:Cesar, e asi?
El mismo resultado en la impresion en una laser

Continue the discussion