Re: [R] Adding page numbers to existing PDFs

2022-10-27 Thread Paul Murrell
Hi Below is a script that does the job for a very simple R plot, making use of R and a couple of free software tools (ghostscript and poppler). It may or may not help with your real problem (NOTE the WARNING) ... library(grImport) ## Multipage PDF created by R pdf("plot-in.pdf") plot(1) pl

Re: [R] Adding page numbers to existing PDFs

2022-10-21 Thread Gabor Grothendieck
Create a pdf using latex that has only page numbers and then superimpose that with your pdf using the free utility pdftk. The animation R package has an interface to pdftk. Google to locate pdftk and again to locate instructions. There are also freeware GUI Windows programs that are easy to use.

Re: [R] Adding page numbers to existing PDFs

2022-10-21 Thread J C Nash
It is not automatic, but I've used Xournal for different tasks of editing a pdf. It would certainly allow page numbers to be added, essentially by overlaying a text box on each page. Clumsy, but possibly useful. I tend to use Xournal to blank parts of documents that recipients should not see, e.

Re: [R] Adding page numbers to existing PDFs

2022-10-21 Thread Dennis Fisher
Bert et al. I searched with slightly different text and found various packages that might be relevant: pdftools staplr QPDF However, as far as I can tell, none of these offers the specific functionality that I need. Dennis Dennis Fisher MD P < (The "P Less Than" Compan

Re: [R] Adding page numbers to existing PDFs

2022-10-21 Thread Bert Gunter
Have you done a web search on "R packages to edit pdf files" or similar? I got what looked like relevant hits with it. Bert On Fri, Oct 21, 2022 at 10:49 AM Dennis Fisher wrote: > R 4.2.1 > OS X > > Colleagues > > I have multipage PDF files that were created in R — the files do NOT have > page

[R] Adding page numbers to existing PDFs

2022-10-21 Thread Dennis Fisher
R 4.2.1 OS X Colleagues I have multipage PDF files that were created in R — the files do NOT have page numbers. I would like to add page numbers after the fact, i.e., read a file into R, add margin text, then output as a PDF. Can this be done in R (base R or a package)? It can be done in Pyt