pdf2png <- function(path = ".", resolution = 200) {
files <- list.files(path = path, pattern = "\\.pdf", full.names = TRUE)
files_png <- sub("\\.pdf", ".png", files)
for (i in seq_along(files)) {
message(files_png[i])
system(paste("convert -density", resolution, "-quality 100",
files[i], files_png[i]))
}
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.