From ripley@stats.ox.ac.uk  Thu Apr 12 07:48:07 2001
From: ripley@stats.ox.ac.uk (ripley@stats.ox.ac.uk)
Date: Thu, 12 Apr 2001 08:48:07 +0200 (MET DST)
Subject: [Rd] using bitmap to make a multi-page pdf file results in (PR#909)
Message-ID: <200104120648.IAA05429@pubhealth.ku.dk>

On Wed, 11 Apr 2001 Setzer.Woodrow@epamail.epa.gov wrote:

> When I execute the following code:
>
> bitmap("test.pdf",type="pdfwrite")
> plot(1:10,1:10,main="ONE")
> plot(1:10,1:10,main="TWO")
> dev.off()
>
> the resulting file test.pdf contains four pages: graph ONE, graph TWO,
> graph ONE, graph TWO.  I can recreate the problem with R version 1.2.1 and
> 1.2.2.  I am using Aladdin ghostscript version 6.50.  The temporary file
> Rbit... has the correct number of graphs in it.  Furthermore, if I execute
> from the command line the command as constructed in 'bitmap()', using the
> Rbit... file as input, I get a pdf file with the correct number of graphs
> in it.


It's  Windows-specific and easy to fix: replace

    cmd <- paste(gsexe, " -dNOPAUSE -dBATCH -q -sDEVICE=", type,
                 " -r", res,
                 " -g", ceiling(res*width), "x", ceiling(res*height),
                 " -sOutputFile=", file, " ", tmp, sep="")

by

    cmd <- paste(gsexe, " -dNOPAUSE -dBATCH -q -sDEVICE=", type,
                 " -r", res,
                 " -g", ceiling(res*width), "x", ceiling(res*height),
                 " -sOutputFile=", file, sep="")

Fixed for 1.2.3

-- 
Brian D. Ripley,                  ripley@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 272860 (secr)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595


-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-devel 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-devel-request@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._


[Rd] using bitmap to make a multi-page pdf file results in (PR#909)
ripley@stats.ox.ac.uk