10

I am wondering ho to put a link text at the bottom of all pages of a pdf file using pdftk. Appreciate your help.

4
  • can you watermark over an image of the url, or does it need to be clickable text? If clickable, what is the source of the pdf (scanned image, text output, pdf form, etc)? Post more details and I can probably help you.
    – WebChemist
    Jul 18, 2012 at 9:04
  • Well, that would be great if it is clickable, because the text is actually my site's link.
    – hnns
    Jul 19, 2012 at 21:53
  • ok... but you still haven't mentioned the pdf source. If you have a pdf form, you can make an empty form field and use FDF injection. Otherwise you could make a seperate pdf with your link and use background or stamp flags. Those 2 might be a problem for a pdf needing both selectable text and clickable watermark link. For that you might need to use uncompress and do a text replacement....
    – WebChemist
    Jul 20, 2012 at 3:20
  • ok nevermind last comment. I thought stamp|background had issues with making original text non-selectable but I tried it and works ok.
    – WebChemist
    Jul 20, 2012 at 3:59

1 Answer 1

16

You can make a clickable watermark using the stamp method. First make a pdf with your link. Create a blank page with your link in the position it needs to be in word or some other word processor (or make a html page) and save as pdf/print to pdf. So if your document is original.pdf and the hyperlink watermark you just made is link.pdf, the usage would be:

pdftk original.pdf stamp link.pdf output final.pdf

The final pdf will still have selectable text and your link will be stamped on top of the original content in the position you placed it, on every page of the original pdf. Obviously you need to include folder paths if the stamp and the original are not in the same folder

3
  • It's really too bad that pdftk doesn't allow one to scale and transform (at least translate) the stamp! It would make this a good deal easier. Oct 13, 2014 at 16:43
  • 1
    If you need to adjust the stamp in an automated workflow, you could probably do so using wkhtmltopdf. You might be able to do the entire pdf in wkhtmltopdf, or at least dynamically position the stamp and then use it as your stamp pdf with pdftk
    – WebChemist
    Oct 13, 2014 at 18:00
  • A bit late, but I implemented this including transformations with pdftk: code.ftt.gmbh/janek/dotfiles/src/commit/…
    – xeruf
    Apr 12, 2023 at 7:42

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .