[R] paper tray selection in postscript() in windows 2000 - a hack for hp8100
rls at pincock.com
Mon Jun 25 23:08:30 CEST 2001
after the message below and some digging in .ps files I found that
replacing the line:
%%DocumentMedia: special 792 1224 0 () ()
%%BeginFeature: *PageRegion Tabloid
<</PageSize [792 1224] /ImagingBBox null>> setpagedevice
selects the right paper tray
>>> Trent Piepho <xyzzy at speakeasy.org> 06/25/01 01:43PM >>>
On Mon, 25 Jun 2001, Bob Sandefur wrote:
> We have a printer which can print on 11x17 inch paper from tray 3. If I use
We have a printer like this too. R doesn't put a postscript command to set
the paper size in it's output, so the printer uses the default paper size.
Our printer is an HP inkjet printer, and due to the paper handling mechanism,
it needs a margin of at least 1/2" on the trailing edge of the paper. R only
lets you select between a 1/4" margin on all sides or no margin with the plot
in one corner. Unless you use paper="special", in which case you can't have
any margins at all.
I made a patch that adds the proper stuff to the R postscript driver, and it
works fine. The patch will make the driver output a "setpagedevice"
postscript command that selects the paper size. I also added an option
"inkjet" which will select 1/2" trailing edge and 1/8" leading edge margins.
And I added a table with over a dozen different paper sizes, so you can use
the name "tabloid" instead of special. This is important because you can't
have margins with a special paper size.
Unfortunately you won't see this patch in R. Prof. Ripley uses Solaris, and
Solaris has a "Document Manager" that handles this paper size issue. It seems
he feels that users must either use Solaris, or edit the postscript output of
R by hand. I found editing 33MB postscript files by hand after every plot
to be rather tedious, so I patched R.
> using paper="11x17" gives invalid page type
11x17 is normally called tabloid. If you have 17" wide paper and 11" high,
i.e. landscape 11x17, it can be called ledger size. R only knows a few paper
sizes, and tabloid isn't one of them.
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch
More information about the R-help