ghostconvert | R Documentation |
THIS CODE WAS TAKEN FROM latexpdf
CRAN URL: https://CRAN.R-project.org/package=latexpdf
File: R/png.R
Version: 0.1.6
Published: 2018-10-26
Author: Tim Bergsma
Maintainer: Tim Bergsma (bergsmat at gmail.com)
License: GPL-3
ghostconvert(
x,
y = file.path(gdir, out),
gdir = dirname(x),
out = sub("\\.[^.]+$", paste0(if (multipage) multifix else NULL, ".", suffix),
basename(x)),
gs_cmd = "",
device = "pngalpha",
multipage = FALSE,
multifix = "-%03d",
suffix = "png",
antialias = 4,
resolution = 300,
replace = TRUE,
other = "",
...
)
x |
path for file to be converted |
y |
path for output file |
gdir |
directory for png output |
out |
filename for output file |
gs_cmd |
passed to |
device |
output device type |
multipage |
whether to convert multiple pages |
multifix |
a filename suffix when converting multiple pages |
suffix |
file extension for output |
antialias |
font antialiasing |
resolution |
raster image resolution |
replace |
whether to delete |
other |
other arguments to ghostscript |
... |
ignored |
Call Ghostscript, converting by default from PDF to PNG.
the name of the file created
## Not run:
pdf <- as.pdf(head(Theoph),dir = tempdir())
png <- ghostconvert(pdf, gs_cmd = 'mgs')
browseURL(png)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.