/staplr

PDF Toolkit. :paperclip: :hammer: :wrench: :scissors: :bookmark_tabs: :file_folder::paperclip:

Primary LanguageR

staplr

Project Status: Active - The project has reached a stable, usable state and is being actively developed. Licence Build Status


CRAN_Status_Badge packageversion


Last-changedate

staplr

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.

Installation

First Install pdftk

download and install pdftk NB: this is not an R package!

Then Install staplr

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")

Example

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))

References