[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

re: landscape printing



> I have developed an application which generates several types of
> documents, some with portrait, others with landscape.  It is
> terribly annoying to have to ask the user to change the orientation
> manually when I already know which orientation it must have.
I've tried similar things in the past to no avail. The one thing you
can do is check to find out what the orientation currently is
and accomodate for it in your drawing routines.  sorry I don't have the
lisp code for checking handy, but here's how to check in pascal:
 
var
    MyPrRotn:   TGetRotnBlk;
.....
    MyPrRotn.iOpCode:= getRotnOp;
    MyPrRotn.iError:= 0;
    MyPrRotn.lReserved:= 0;
    MyPrRotn.hPrint:= MAINPRINT;
    MyPrRotn.fLandscape:= false;
    MyPrRotn.bXtra:= 0;
    PrGeneral(@MyPrRotn);
    if (PrError = noErr) and (MyPrRotn.iError = noErr) then
        Landscape:= MyPrRotn.fLandscape
    else Landscape:= false;
 
     -john