Jon Olav Skoien
2014-Jul-14 08:43 UTC
[Rd] Error in compactPDF/find_gs_cmd or documentation?
I am using tools::compactPDF for reducing the size of some pdf-files with GhostScript. I had some trouble in the beginning as the documentation seems not to match the usage of the function. For GhostScript, one has to set the argument gs_cmd, which has the following description: gs_cmd - Character string giving the path to the GhostScript executable, if that is to be used. On Windows this is the path to 'gswin32c.exe' or 'gswin64c.exe'. If "", the function will try to find a platform-specific path to GhostScript. The first part seems not to work as described. If gs_cmd is given, this is passed to find_gs_cmd. This function will then call: Sys.which(gs_cmd) which rather takes the name of the executable as input. I guess either the documentation should be changed to refer to the name of the GhostScript executable, or the function should be changed to use the given path. Best wishes, Jon -- Jon Olav Skøien Joint Research Centre - European Commission Institute for Environment and Sustainability (IES) Climate Risk Management Unit Disclaimer: Views expressed in this email are those of the individual and do not necessarily represent official views of the European Commission. [[alternative HTML version deleted]]
Henrik Bengtsson
2014-Jul-14 09:22 UTC
[Rd] Error in compactPDF/find_gs_cmd or documentation?
Seems related to: https://stat.ethz.ch/pipermail/r-devel/2012-May/064213.html Henrik On Jul 14, 2014 10:45 AM, "Jon Olav Skoien" <jon.skoien@jrc.ec.europa.eu> wrote:> > I am using tools::compactPDF for reducing the size of some pdf-files > with GhostScript. I had some trouble in the beginning as the > documentation seems not to match the usage of the function. For > GhostScript, one has to set the argument gs_cmd, which has the following > description: > gs_cmd - Character string giving the path to the GhostScript executable, > if that is to be used. On Windows this is the path to 'gswin32c.exe' or > 'gswin64c.exe'. If "", the function will try to find a platform-specific > path to GhostScript. > > The first part seems not to work as described. If gs_cmd is given, this > is passed to find_gs_cmd. This function will then call: > Sys.which(gs_cmd) > which rather takes the name of the executable as input. I guess either > the documentation should be changed to refer to the name of the > GhostScript executable, or the function should be changed to use the > given path. > > Best wishes, > Jon > > -- > Jon Olav Skřien > Joint Research Centre - European Commission > Institute for Environment and Sustainability (IES) > Climate Risk Management Unit > > Disclaimer: Views expressed in this email are those of the individual and > do not necessarily represent official views of the European Commission. > > > > [[alternative HTML version deleted]] > > > ______________________________________________ > R-devel@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-devel > >[[alternative HTML version deleted]]
Seemingly Similar Threads
- R CMD check: Sys.getenv("R_GSCMD") cannot contain full pathname (contrary to docs)
- Bug in tools::compactPDF() in 2.13-0-alpha
- How to point R toward Ghostscript on a Windows XP system
- vignettes: problems with PDF compaction
- New S3 methods for optional package