I don't know if R is capable of doing that.  What you want to do should 
be possible using pdftk with the multistamp option though:

1. create another pdf (pagenumbers.pdf) of the same length (same number 
of pages) which just has the page numbers on it

2. merge with existing, unnumbered text.pdf using

pdftk pagenumbers.pdf multistamp text.pdf output pagenumbers_and_text.pdf

On 08.10.20 00:26, Dennis Fisher wrote:
> R 4.0.2
> OS X
>
> Colleagues
>
> Does R have the capability of adding text (e.g., page numbers) to an existing 
> PDF (previously created with R) -- other than adding this text, the PDF 
> should be unchanged (except for a new filename).
>
> The intent is as follows:
>       I have multiple PDFs that I eventually merge into a single PDF, 
> separating each one with a separator page.
>       The content of the separator pages comes from a Word document.
>       The task is performed with textreadr, officer, and pdftools.
> I can insert page numbers into the separator pages (created as PDF documents).
> I join the separator pages and the original PDFs using python's join command.
> But I have not been able to figure out how to add page numbers to the 
> existing PDF's.
>
> Any help would be appreciated.
>
> Dennis
>
>
> Dennis Fisher MD
> P < (The "P Less Than" Company)
> Phone / Fax: 1-866-PLessThan (1-866-753-7784)
> www.PLessThan.com <http://www.plessthan.com/>
>
>
>
>
>
>       [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.

        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to