FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin para Harbour/xHarbour SetSize no funciona
Posts: 1364
Joined: Wed Jun 21, 2006 12:39 AM
SetSize no funciona
Posted: Wed Apr 27, 2022 05:34 PM

Compa帽eros

Estoy usando la clase printer y quiero definir el tama帽o de una hoja en particular, quise usar oPrn : SetSize() pero no funciona, tampoco tiene mucho efecto oPrn : SetPage()
Hay alguna soluci贸n para esto. Uso FWH 20.04, Harbour 3.2 y BCC7. Muchas gracias

Saludos

Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM
Re: SetSize no funciona
Posted: Thu Apr 28, 2022 01:44 PM

Horacio,

Puedes copiar aqui un ejemplo de como lo est谩s usando ?

gracias

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 1364
Joined: Wed Jun 21, 2006 12:39 AM
Re: SetSize no funciona
Posted: Fri Apr 29, 2022 03:18 PM
Hola Antonio, aqu铆 va un ejemplo

Code (fw): Select all Collapse
聽 聽 Printer oPrn Name "Impresi贸n comprobantes Rapipago" Preview 
聽 聽 聽 聽oPrn : lPrvModal := .t.
聽 聽 聽 聽Define Font oFont1 Name 'Arial' 聽 Size 0, 聽-6 Of oPrn
聽 聽 聽 聽Define Font oFont2 Name 'Arial' 聽 Size 0, 聽-6 Of oPrn Bold
聽 聽 聽 聽Define Font oFont3 Name 'Arial' 聽 Size 0, 聽-8 Of oPrn
聽 聽 聽 聽Define Font oFont4 Name 'Arial' 聽 Size 0, 聽-8 Of oPrn Bold
聽 聽 聽 聽Define Font oFont5 Name 'Arial' 聽 Size 0, -10 Of oPrn
聽 聽 聽 聽Define Font oFont6 Name 'Tahoma' 聽Size 0, -10 Of oPrn Bold
聽 聽 聽 聽Define Font oFont7 Name 'Arial' 聽 Size 0, 聽-6 Of oPrn //Nescapement 900
聽 聽 聽 聽//oPrn : SetPage( 36 ) 
聽 聽 聽 聽 oPrn : SetSize( 50, 180 )
聽 聽 聽 聽 aPaperSizes := oPrn : GetPhySize()
聽 聽 聽 聽 Page
聽 聽 聽 聽 聽 聽 oPrn : CmSay( 5, 5, "Hola Mundo" oFont1 )聽 聽聽 聽 聽 聽 
聽 聽 聽 聽 EndPage
聽 聽 EndPrint


Muchas gracias

Saludos
Posts: 1364
Joined: Wed Jun 21, 2006 12:39 AM
Re: SetSize no funciona
Posted: Sun May 01, 2022 02:46 AM

+1

Posts: 1364
Joined: Wed Jun 21, 2006 12:39 AM
Re: SetSize no funciona
Posted: Tue May 03, 2022 12:13 PM

+1

Posts: 1344
Joined: Wed Nov 16, 2005 09:14 PM
Re: SetSize no funciona
Posted: Wed May 04, 2022 12:22 AM
Prueba y comenta si ves los cambios de los diferentes tipos de paginas y tama帽os
Code (fw): Select all Collapse
#include "FiveWin.Ch"

FUNCTION Main()
LOCAL oPrn, oFont1, oFont2
       Define Font oFont1 Name 'Arial'   Size 60,  95 Of oPrn
       Define Font oFont2 Name 'Arial'   Size 60,  95 Of oPrn Bold
  PRINT oPrn Name "Impresi贸n comprobantes Rapipago A4" Preview
       
        oPrn:SetPortrait()    
        Page           
            oPrn:SetPage(9) 
            @ 0,0 PRINT TO oPrn IMAGE "..\bitmaps\olga1.jpg" SIZE oPrn:nHorzRes(), oPrn:nVertRes() PIXEL GRAY         
            @ 5, 5 PRINT TO oPrn TEXT "Hola Mundo";
                      SIZE 18,1 CM FONT oFont1 ALIGN "C"
        EndPage
    EndPrint 

    PRINT oPrn Name "Impresi贸n comprobantes Rapipago A5 apaisado" Preview
       
        oPrn:SetLandscape()
        Page
            oPrn:SetPage(11)  
            @ 0,0 PRINT TO oPrn IMAGE "..\bitmaps\olga1.jpg" SIZE oPrn:nHorzRes(), oPrn:nVertRes() PIXEL GRAY         
            @ 5, 5 PRINT TO oPrn TEXT "Hola Mundo";
                      SIZE 18,1 CM FONT oFont1 ALIGN "C"
        EndPage
    EndPrint 

    PRINT oPrn Name "Impresi贸n comprobantes Personalizado" Preview
       
        oPrn:SetPortrait()        
        Page
            oPrn:SetPage(27)   
            @ 0,0 PRINT TO oPrn IMAGE "..\bitmaps\olga1.jpg" SIZE oPrn:nHorzRes(), oPrn:nVertRes() PIXEL GRAY         
            @ 5, 5 PRINT TO oPrn TEXT "Hola Mundo";
                      SIZE 18,1 CM FONT oFont1 ALIGN "C"
        EndPage
    EndPrint 
    RELEASE FONT  oFont1
    RELEASE FONT  oFont2
return nil

Continue the discussion