[futurebasic] Re: [FB] OS X printing

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : October 2002 : Group Archive : Group : All Groups

From: Douglas Stemen <dstemen@...>
Date: Fri, 11 Oct 2002 08:20:50 -0400
Robert,

I am grateful for your help. I works great as long as PMSetOrientation 
is after the DEF PAGE.

It appears the only problem is that if PMSetOrientation is before DEF 
PAGE then the DEF PAGE window doesn't know that landscape was selected 
because it always displays portrait view. How do commercial programs 
like Microsoft Word & Excel documents automatically set the mode from 
the saved document when the DEF PAGE window is called? Is there a 
toolbox parameter in the DEF PAGE window call that is set?

Thanks again!

Doug



On Thursday, October 10, 2002, at 12:52 AM, Robert Purves wrote:

>
> On Wednesday, October 9, 2002, at 07:23  AM, Douglas Stemen wrote:
>
>> I need to always have some documents print in landscape when printing 
>> from my program in OS X.
>> Can someone tell me what variable I have to set to do so?
>> I use DEF PAGE, DEF LPRINT, but asking the user to click on landscape 
>> each time they print is not a viable option.
>
> With this demo (OS X only) I was able to get landscape mode in a 
> preview of the printed page.
> From limited testing, it seems that   def page   destroys the effect 
> of PMSetOrientation, whether it is placed before or after the call to 
> PMSetOrientation.
> That's why there is no  def page  in the demo.
>
> _kPMPortrait  = 1
> _kPMLandscape = 2
> toolbox fn PMSetOrientation( PMPageFormat pageFormat, ¬
>                 UInt16 orientation, Boolean lock ) = OSStatus
>
> dim as OSStatus status
> dim as Handle   dummy
> window 1
> dummy = prHandle
> status = fn PMSetOrientation( gFBPageFormat, _kPMLandscape, _false )
> if status then stop "Error " + str$( status )
> def lprint
> long if prCancel == _false
> route _toPrinter
> print "Hello"
> route _toScreen
> clear lprint
> end if
>
>
> Robert P.
>
>
> --
> To unsubscribe, send ANY message to 
> <futurebasic-unsubscribe@...>
>