This page shows how to merge different pdf documents into one document using the R Package pdftools. You can install it using the code below.
install.packages("pdftools")
First, navigate to the folder where the pdf documents are located at.
setwd("~/GitLab/s170a/PDF")
Second, load the package using the library()
function.
library(pdftools)
## Using poppler version 0.86.1
Using the pdf_combine()
function to merge the documents. Use the input
argument to specify the name of the files in a character vector. Use the output
argument to specify the name of the PDF document.
pdf_combine(input = c("Document1.pdf","Document2.pdf","Document2.pdf"), output = "Merge.pdf")
## [1] "/home/isaac/GitLab/s170a/PDF/Merge.pdf"
The Merged document should be located in the same folder as the other documents.