split_merge: Split and merge PDFs

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

Description

Split PDF into separate pages or merge multiple PDFs into one.

Usage

1
2
3
split_pdf(file, outdir = NULL, password = NULL)

merge_pdfs(file, outfile)

Arguments

file

For merge_pdfs, a character vector specifying the path to one or more local PDF files. For split_pdf, a character string specifying the path or URL to a PDF file.

outdir

For split_pdf, 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.

password

Optionally, a character string containing a user password to access a secured PDF. Currently, encrypted PDFs cannot be merged with merge_pdfs.

outfile

For merge_pdfs, a character string specifying the path to the PDF file to create from the merged documents.

Details

split_pdf splits the file listed in file into separate one-page doucments. merge_pdfs creates a single PDF document from multiple separate PDF files.

Value

For split_pdfs, a character vector specifying the output file names, which are patterned after the value of file. For merge_pdfs, the value of outfile.

Author(s)

Thomas J. Leeper <thosjleeper@gmail.com>

See Also

extract_areas, get_page_dims, make_thumbnails

Examples

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

# split PDF by page
sf <- split_pdf(f)

# merge pdf
merge_pdfs(sf, "merged.pdf")
get_n_pages(file = "merged.pdf")

## End(Not run)

Logiwo/tabulizer documentation built on May 9, 2019, 1:57 a.m.