// Printing in portrait and in landscape
#include "fivewin.ch"
#define PAD_LEFT 0
#define PAD_RIGHT 1
#define PAD_CENTER 2
function Main()
local oPrn, oFont, oPen
Local nLinI, nColI, nLinF, nColF
//PRINT oPrn NAME "Impresión en Vertical.." PREVIEW
PRINT oPrn NAME "Impresión en Vertical.." PREVIEW MODAL
DEFINE FONT oFont NAME "Arial" SIZE 0, -10 BOLD OF oPrn
DEFINE PEN oPen WIDTH 2 OF oPrn
oPrn:Setup()
oPrn:SetPage(9) // A4
oPrn:SetPortrait() //Vertical
PAGE
nLinI := 0.90
nColI := 0.90
nLinF := 28.6
nColF := 20.0
oPrn:Cmtr2Pix(@nLinI, @nColI)
oPrn:cmtr2Pix(@nLinF, @nColF)
oPrn:Box(nLinI, nColI, nLinF, nColF, oPen )
oPrn:cmSay( 1.0, 1.0, "Superior Izquierda", oFont,,CLR_BLACK,,PAD_LEFT )
oPrn:cmSay( 1.0, 10.5, "Superior Centro", oFont,,CLR_BLACK,,PAD_CENTER )
oPrn:cmSay( 1.0, 20.0, "Superior Derecha", oFont,,CLR_BLACK,,PAD_RIGHT )
oPrn:cmSay(28.0, 1.0, "Inferior Izquierda", oFont,,CLR_BLACK,,PAD_LEFT )
oPrn:cmSay(28.0, 10.5, "Inferior Centro", oFont,,CLR_BLACK,,PAD_CENTER )
oPrn:cmSay(28.0, 20.0, "Inferior Derecha", oFont,,CLR_BLACK,,PAD_RIGHT )
ENDPAGE
ENDPRINT
PRINT oPrn NAME "Impresion Horizontal..." PREVIEW
DEFINE FONT oFont NAME "Arial" SIZE 0, -10 BOLD OF oPrn
DEFINE PEN oPen WIDTH 2 OF oPrn
oPrn:SetPage(9) //a4
oPrn:SetLandscape() // HORIZONTAL
PAGE
nLinI := 0.90
nColI := 0.90
nLinF := 20.1
nColF := 28.6
oPrn:Cmtr2Pix(@nLinI, @nColI)
oPrn:cmtr2Pix(@nLinF, @nColF)
oPrn:Box(nLinI, nColI, nLinF, nColF, oPen )
oPrn:cmSay( 1.0, 1.0, "Superior Izquierda", oFont,,CLR_BLACK,,PAD_LEFT )
oPrn:cmSay( 1.0, 14.8, "Superior Centro", oFont,,CLR_BLACK,,PAD_CENTER )
oPrn:cmSay( 1.0, 28.0, "Superior Derecha", oFont,,CLR_BLACK,,PAD_RIGHT )
oPrn:cmSay(19.5, 1.0, "Inferior Izquierda", oFont,,CLR_BLACK,,PAD_LEFT )
oPrn:cmSay(19.5, 14.8, "Inferior Centro", oFont,,CLR_BLACK,,PAD_CENTER )
oPrn:cmSay(19.5, 28.0, "Inferior Derecha", oFont,,CLR_BLACK,,PAD_RIGHT )
ENDPAGE
ENDPRINT
return nil