image_to_pdf | R Documentation |
This helper function converts a vector of images to a single PDF.
image_to_pdf(files, pdf_name)
files |
a vector of image files |
pdf_name |
a string with the name of the new PDF |
Combines any number of image files of almost any type to a single PDF. The vector can consist of different image file types. See the 'Magick' package documentation https://cran.r-project.org/package=magick for details on supported file types. Note that on Linux, ImageMagick may not allow conversion to pdf for security reasons.
no return value, called for side effects
## Not run:
# Single file
new_pdf <- file.path(tempdir(), "document.pdf")
image_to_pdf("document.jpg", new_pdf)
# A vector of image files:
image_to_pdf(images)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.