From ripley at stats.ox.ac.uk  Thu Mar  9 09:21:45 2006
From: ripley at stats.ox.ac.uk (Prof Brian Ripley)
Date: Thu, 9 Mar 2006 08:21:45 +0000 (GMT)
Subject: [Rd] Wishlist: Creating horizontal PDFs
In-Reply-To: <adf71a630603080807u510da0dcq2dc8a3adb0276dad@mail.gmail.com>
References: <adf71a630603080807u510da0dcq2dc8a3adb0276dad@mail.gmail.com>
Message-ID: <Pine.LNX.4.64.0603090814270.12692@gannet.stats.ox.ac.uk>

On Wed, 8 Mar 2006, Kevin Wright wrote:

> It would be nice to easily create horizontal PDF files for standard paper
> sizes.  For example:
> pdf(file, paper="default", horizontal=TRUE)
>
> Currently (R 2.2.1) there is no 'horizontal' argument for the PDF driver.
> It looks like the only way to create a horizontal PDF is to manually specify
> width and height.  For example:
> pdf(file, width=11, height=8.5)
>
> Does this feature look useful?  If so, I may someday try to make the changes
> (I rarely have the ability to build R).
>
> If anyone else wants to make the change, the code for the PDF driver appears
> to be in R-devel/src/library/grDevices/src/devPS.c
>
> The changes should not be hard.  FYI...there is a 'horizontal' option for
> the postscript driver.

They may be harder than you think, as PS is a more powerful language than 
PDF.

I don't see the point here.  Postscript files have an orientation (in the 
DSC comments), and PDF files do not.  For postscript just swapping width 
and height is not enough, for pdf it might be.  If you want to do just 
that, why not write your own wrapper to pdf?  However, note that viewers 
may well decide on the orientation automatically or via 
user-specification, so there is no way I know of to make PDFs that will 
print/display in particular orientations.  Again unlike postscript, PDF is 
not designed to be sent directly to a printer.

> Kevin Wright
>
> 	[[alternative HTML version deleted]]

Time to read the posting guide ....

-- 
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



[Rd] Wishlist: Creating horizontal PDFs
Prof Brian Ripley