pdf_to_images: Convert PDF to Other Images using ImageMagick

Description Usage Arguments Value Examples

View source: R/pdf_to_images.R

Description

Convert PDF to Other Images using ImageMagick

Usage

1
2
3
4
5
6
7
8
pdf_to_images(
  pdf_file,
  out_dir = NULL,
  extra.opts = "-density 300 -quality 100",
  stub = "img_%04d",
  output_type = "png",
  convert = "convert"
)

Arguments

pdf_file

Filename of PDF file

out_dir

Output directory. If 'NULL', then a temporary directory will be used. If files of the same name are in the 'out_dir', these will be overwritten

extra.opts

Extra options passed to animation::im.convert

stub

prefix of the output files, can include C-style printing of digits and such

output_type

Type of output, such as 'png' or 'jpg'

convert

converter passed to animation::im.convert

Value

A character vector of filenames

Examples

1
2
3
4
5
## Not run: 
ex_file = system.file("extdata", "example.pdf", package = "didactr")
res = pdf_to_images(ex_file)

## End(Not run)

muschellij2/didactr documentation built on March 17, 2021, 12:45 p.m.