powered by
Call Ghostscript, converting by default from PDF to PNG.
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 = "", ... )
the name of the file created
path for file to be converted
path for output file
directory for png output
filename for output file
passed to find_gs_cmd; perhaps 'gs' or 'gswin32c' or 'mgs' (from Miktex)
find_gs_cmd
output device type
whether to convert multiple pages
a filename suffix when converting multiple pages
file extension for output
font antialiasing
raster image resolution
whether to delete x if successful
x
other arguments to ghostscript
ignored
if (FALSE) { pdf <- as.pdf(head(Theoph),dir = tempdir()) png <- ghostconvert(pdf, gs_cmd = 'mgs') browseURL(png) }
Run the code above in your browser using DataLab