I have a PDF file and I wish to add on the footer of all pages (except the first two) a line of plain text (not a logo or something alike).
Did anyone has an example of how this can be done (in any language)?
Update: The original PDF was made with Scribus and I have total control of it. So if it easier to make a find&replace operation, that's fine too.
If "the footer" is defined by a position (i.e. specified in millimeters for example), you can just use your favorite language (TeX, PHP, FPDF, Postscript, ...) to render a PDF containing the two lines and then overlay this PDF on top of your existing PDF using pdftk.
If you want to apply the overlay only to the first two pages, you have to use a temporary file like this:
pdftk input.pdf stamp overlay.pdf output temp.pdf
pdftk A=input.pdf B=temp.pdf cat A1-2 B3-end output result.pdf
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With