If (free command line) version of pdftk is an acceptable auxiliary tool, then you can automate the solution from this question in R (i.e., using the stamp
operation in pdftk
):
Generate PDF to experiment with:
pdf("test1.pdf")
plot(1:10,1:10)
dev.off()
Generate "watermark" overlay:
pdf("stamp.pdf")
par(fg="white")
## to match spacing etc - 'phantom' plot
plot(1:10,1:10, type="n", axes=FALSE, ann=FALSE)
par(fg="black")
text(5,5, "watermark", col=adjustcolor("gray", alpha.f=0.2), cex=5)
dev.off()
Call pdftk
to do the overlay:
system("pdftk test1.pdf stamp stamp.pdf output test1S.pdf")
Results:

I think the fussy part will be getting the spacing in the overlay file the way you want it ... although you could use grid graphics, or create a zero-margin/zero-annotation plot so that the plotting area had bounds (0,1) x (0,1) ...