pro pwini,n ;Created by C. See, Aug. 98 ;This procedure prints window n window=!D.window ;saves the starting window if n_params() eq 0 then n = window ;defaults to the current window wset,n ;establishes n as the current window t=tvrd() ;reads the window s=size(t) aspect=float(s(1))/s(2) if aspect lt 1.33 then y=7.5 else y=7.5*1.33/aspect ;sets for full page ;if t(0,0) eq 0 then t=max(t)-t ;inverts for black background t=max(t)-t ;inverts ;setup for poscript printing... set_plot,'ps' device,filename = 'c:\idl.ps',/landscape,ysize=y,/inches,bits_per_pixel=8 tv,bytscl(t,min=0,max=185,top=255B) ;scaled for postscript ;output & print... device,/close_file spawn,'gsprint c:\idl.ps' set_plot,'win' wset,window ;returns to starting window end