Closed pboesu closed 8 years ago
Right I noticed this as well. I'll try to figure this out. If you're on linux or mac, you can render pdf via pdftools:
library(pdftools)
library(magick)
bitmap <- pdf_render_page("https://cran.r-project.org/web/packages/magick/magick.pdf", 1)
img <- image_read(bitmap)
I have added a desnity
paramamter to image_read:
download.file("https://cran.r-project.org/web/packages/magick/magick.pdf", "magick.pdf")
page <- image_read("magick.pdf[1]", density = "300x300")
Brilliant! Thank you.
PDFs appear to be down sampled quite badly when you read them in currently. Is there a way to add a
density
argument to specify the resolution of a PDF when using image_read()? Something analogous to command line statements likeconvert -density 300 file.pdf file.png