-1
I have a . pdf with 120 pages, each page is a certificate and the only difference between them is the name of the participant.
I also have a . csv with the list of participants' names and e-mail address (I used this list to generate the . pdf and I will try to use the e-mail to send by R)
How I can separate each page (certificate) into a new . pdf and save with attendee name?
I saw functions like pdf_subset
of library(pdftools)
, but how I can identify the page number by something written on it?
library(pdftools)
# extair paginas de 1
pdf_subset('certificados.pdf',
pages = 1, output = "Carlos dos Santos.pdf")
It’s a pretty repetitive job, I wouldn’t want to do it manually.
I also thought of separating page by page and then searching for the name in . pdf and changing the name of the file. But I also don’t know how to do this yet.
Follows model of certificate: https://drive.google.com/file/d/1iwgW6kMT7C9Xee5SM65vz-D8B26bpavz/view?usp=sharing
Example of . csv:
nome,email
Prof. Dr. Thiado Souza,[email protected]
Prof. Dr. Marcelo José,mjose@gmail
Ricado Augusto,[email protected]
Carlos José,[email protected]
This is @Rxt, blz? You have the
.pdf
to make available? It can be a fake (or with names omitted), so I can try some code. Only that as you want to "separate each page (certificate) into a new . pdf", I think it is easier to do via command terminal. You use Ubuntu? Ubuntu has Imagemagick that should do it in an easy way (I just don’t know how to make this loop of each page, but it’s a matter of searching). And dps of that, I imagine the rest is easier.– Guilherme Parreira
@Guilhermeparreira thanks for your attention! I added the file in question ! Yes, I use Mint actually, but it should not be different, right?!
– RxT