So I would like to add the same pdf cover page to all the individual pdfs in a folder, then put the combined files into a different folder.
The folder architecture looks like this:
Projectfolder
|
+-- cover.pdf
|
+-- inputfolder
| |
| +-- file01.pdf
| +-- file02.pdf
| +-- file03.pdf
| +-- file04.pdf
| +-- etc...
|
+-- outputfolder
| |
| +-- cover+file01.pdf
| +-- cover+file02.pdf
| +-- etc...
So I want the end result to be cover+inputfile# for each different file in the input folder to end up in the output folder.
I cant quite figure out how to format things for lapply or loops
FILELIST <- list.files(path = "~/inputfolder", pattern="*.pdf", full.names = T)
for (i in FILELIST) {
pdf_combine(input = c("cover.pdf", i),
output = "i.pdf")
}
*Note I do NOT want to merge all of them. Theres enough examples of that Ive found already