[futurebasic] Re: [FB] Print driver questions

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : May 2004 : Group Archive : Group : All Groups

From: Robert Purves <robert.purves@...>
Date: Mon, 31 May 2004 14:55:57 +1200
George Beckman wrote:

>  I am mainly interested in auto-switching to and from landscape.
> This is an easy call in (dare I say it) Windoz.   Can we force this by
> pushing values to the Print Driver (Record)

You could use PMSetOrientation as in the demo.  Note that the Boolean 
lock parameter is currently ignored by the Carbon Print Manager.

'---------------
'~'A
'                           CPU : Carbon
'~'B
_kPMPortrait  = 1
_kPMLandscape = 2
toolbox fn PMSetOrientation( PMPageFormat pageFormat, ¬
                 UInt16 orientation, Boolean lock ) = OSStatus

dim as OSStatus  err
def lprint
long if ( prCancel == _false )
// set landscape orientation
err = fn PMSetOrientation( gFBPageFormat, _kPMLandscape, _false )
if ( err ) then stop "PMSetOrientation error " + str$( err )
route _toPrinter
print "Test"
route _toScreen
close lprint
end if

do
HandleEvents
until 0
'---------------


Robert P.