[R] How to print landscape from script in Windows: dev.print(win.print, printer="local printer name", ...) does not accept horizontal=TRUE

Prof Brian Ripley ripley at stats.ox.ac.uk
Thu Sep 30 08:47:32 CEST 2004


Set width and height appropriately for a landscape plot, and set landscape 
in the options for the printer driver (if supported).

Whereas the postscript device can rotate a plot by 90^o, no Windows device 
has that encoded.  Why?  Because the Windows print spooler gives you the 
option to rotate and Unix ones do not.

Or use postscript() + a PostScript printer/printer utility (e.g. GSView on 
Windows).

On Wed, 29 Sep 2004 davidr at rhotrading.com wrote:

> This is a windows-specific question.
> 
>  
> 
> After generating a plot, I can print from scripts or the command line
> with 
> 
>  
> 
> > dev.print(win.print,printer="local windows printer name")
> 
>  
> 
> I would like to print in landscape mode. From the menus, I can
> accomplish this by changing the properties of the printer before
> clicking "print".
> 
> However, I tried adding "horizontal=TRUE" to the command, but it gives
> an error message:
> 
>  
> 
> > dev.print(win.print,horizontal=TRUE,printer="\\\\RhoSvr01\\HP LaserJet
> 8150 PCL 6")
> 
> Error in device(...) : unused argument(s) (horizontal ...)
> 
>  
> 
> I can see from ?device and then ?win.print that, sure enough, there is
> no 'horizontal' parameter in win.print.
> 
>  
> 
> There are many examples like this on the help archives and in the docs,
> apparently for other devices,
> 
> so I am puzzled how to accomplish what I want.
> 
>  
> 
>  
> 
> BTW,
> 
> This is on Windows XP SP2 and
> 
>  
> 
> > R.version
> 
>          _              
> 
> platform i386-pc-mingw32
> 
> arch     i386           
> 
> os       mingw32        
> 
> system   i386, mingw32  
> 
> status   Patched        
> 
> major    1              
> 
> minor    9.1            
> 
> year     2004           
> 
> month    09             
> 
> day      22             
> 
> language R              
> 
>  
> 
> Any help will be much appreciated!
> 
>  
> 
>  
> 
> David L. Reiner
> 
>  
> 
> Rho Trading
> 
> 440 S. LaSalle St -- Suite 620
> 
> Chicago  IL  60605
> 
>  
> 
> 312-362-4963 (voice)
> 
> 312-362-4941 (fax)
> 
>  
> 
>  
> 
> 
> 	[[alternative HTML version deleted]]
> 
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
> 
> 

-- 
Brian D. Ripley,                  ripley at stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595




More information about the R-help mailing list