Thanks! For some reason PRHANDLE cannot return the correct page width & height but window(_width) does after I use RP's routine to change the orientation. Doug > On Saturday, December 21, 2002, at 08:58 AM, Edwards, Waverly wrote: > > > I dont know how to get that information from PRHANDLE. > What I ended up doing was once the printer port was > opened I used window(_width) and window(_height) to > get the page dimensions. If the width of the page > is wider than the length then its landscape otherwise > its portrait. > > Hope that helps. > > W. > > > -----Original Message----- > From: Douglas Stemen > To: futurebasic@... > Sent: 12/21/02 4:55 AM > Subject: Re: [FB] OS X printing > > RP, > > Several months ago you gave me the code listed below to change the page > print orientation within the program. > > It works great except that when use prHndl&=PRHANDLE and then > pagewidth=prHndl&..prInfo.rpage.right% to get the width of the page for > printing (after setting the page orientation). > > The PRHANDLE function does not not return the page width and height > that corresponds with the orientation I set. Of course, PRHANDLE does > return the correct page width if DEF PAGE is used. > > Do you know how I can get PRHANDLE to read the correct page dimensions > that are set with FN PMSetOrientation ? > > Thanks > > Doug Stemen > > >> 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 > > > -- > To unsubscribe, send ANY message to > <futurebasic-unsubscribe@...> > > -- > To unsubscribe, send ANY message to > <futurebasic-unsubscribe@...> >