make_thumbnails: make_thumbnails

Description Usage Arguments Details Value Note Author(s) References See Also Examples

View source: R/make_thumbnails.R

Description

Convert Pages to Image Thumbnails

Usage

1
2
make_thumbnails(file, outdir = NULL, pages = NULL, format = c("png",
  "jpeg", "bmp", "gif"), resolution = 72L, password = NULL)

Arguments

file

A character string specifying the path or URL to a PDF file.

outdir

An optional character string specifying a directory into which to split the resulting files. If NULL, the directory of the original PDF is used, unless file is a URL in which case a temporary directory is used.

pages

An optional integer vector specifying pages to extract from.

format

A character string specifying an image file format.

resolution

An integer specifying the image resolution in DPI.

password

Optionally, a character string containing a user password to access a secured PDF.

Details

This function save each (specified) page of a document as an image with 720 dpi resolution. Images are saved in the same directory as the original file, with file names specified by the original file name, a page number, and the corresponding file format extension.

Value

A character vector of file paths.

Note

This may generate Java “INFO” messages in the console, which can be safely ignored.

Author(s)

Thomas J. Leeper <[email protected]>

References

Tabula

See Also

extract_tables, extract_text, make_thumbnails

Examples

1
2
3
4
5
6
7
## Not run: 
# simple demo file
f <- system.file("examples", "data.pdf", package = "tabulizer")

make_thumbnails(f)

## End(Not run)

Logiwo/tabulizer documentation built on Aug. 18, 2017, 12:08 a.m.