This package provides function to manipulate PDF files:
- merge multiple PDF files into one
- splits a single input PDF file into individual pages
- remove selected pages from a file
- rename multiple files in a directory
This package is still under development and this repository contains a development version of the R package staplr.
download and install pdftk NB: this is not an R package!
You can install the stable version from CRAN.
install.packages('staplr', dependencies = TRUE)
You can install staplr from github with:
# install.packages("devtools")
devtools::install_github("pridiltal/staplr")
library(staplr)
# Merge multiple PDF files into one
staple_pdf()
# This command promts the user to select the file interactively. Remove page 2 and 3 from the selected file.
remove_pages(rmpages = c(2,3))
# This function splits a single input PDF document into individual pages
split_pdf()
# This function writes renamed files back to directory
#if the directory contains 3 PDF files
rename_files(new_names = paste("file",1:3))