To discourage readers from uploading it to public file-sharing sites, I'd like to personalize each copy of a PDF document to embed some identifying information to each page.

I'm thinking of something along the lines of adding the name and/or email address of the "authorized" reader (i.e., the "owner", the original buyer, registrant, etc.) to the footer of most pages. (Maybe prefaced with "From the library of..." or something like that to make it a little more friendly.)

I'm not trying to hide this from the reader. In fact letting the reader know that sharing their copy of the book is also sharing their name or email address is much of the point of the exercise.

It isn't difficult to merge two PDF documents together, so it would be easy to add the identifying information on a single page, but I'd like it to appear on all (or at least most) pages.

This particular book happens to be generated from a LaTeX document. There are LaTeX packages that can be used to customize the page footer, of course, but I'd prefer a solution that would work for an arbitrary PDF document. (The LaTex-to-PDF process is relatively slow, and I'd like to be able to do this both on-demand and/or in batches.)

This particular book happens to be distributed as a PDF document, but something similiar for other ebook formats could be useful in the future (both for me, and I suspect, others).

I am aware that a moderately savvy reader can probably remove or overwrite the identifying text, and that this is likely to be even easier to do with formats like epub or mobi. That's OK. I'm not looking for bullet-proof DRM.

TL/DR: Can anyone recommend a utility or process for generating multiple copies of a PDF document, each with a small bit of text added to the footer?

BTW, I believe that 37 Signals did this for one or more of their books, but I've been unable to find any mention of exactly how it is done.

EDIT: I know that a Google search for "PDF Watermark", etc. yields a number of tools for doing this. The trouble is that there are many such tools, all of them seemingly from small shops, and many of them look to be crappy at best and shady at worst. Can anyone recommend a specific application or approach? (My ideal solution would be Linux-based, since the rest of my publishing workflow is Linux based, but I'm sure many readers would be happy to see Windows-only recommendations as well.)

  • 1
    Also, Is “soft DRM” a viable option? asks a distinct but related question.
    – Rod
    Commented Jan 3, 2014 at 5:29
  • 3
    Putting it on each page might be too much. I've read a book once which contains a "Licensed to XY <[email protected]>" footer on every page. It was very disappointing and completely killed the joy of reading. Like breaking a movie in every second minute to show an anti-piracy commercial. I've paid for the book but the author still thinks that I'm a criminal...
    – palacsint
    Commented Jan 3, 2014 at 7:12
  • 2
    Please don't. I heartily agree with @palacsint: just imagine the analogue for a paper book, with a your name and address printed on each page. More concretely, I'd not buy such an ebook.
    – DaG
    Commented Jan 3, 2014 at 13:25
  • 1
    @palacsint Perhaps mentioning it once on the title page would not turn off so many potential readers (as compared to adding a footer to every page)? Something along the lines of "Custom made for Joe Smith" or the like?
    – John
    Commented Jan 3, 2014 at 13:54
  • 1
    As a point of clarification, this is a non-fiction reference-like work, if that changes things. For what it's worth I just pulled a few similar books off my shelf. They all have text in the header and footer of each page. One of them even has a copyright statement at the footer of each page (but it is the kind of book that one might want to might want to photocopy and share small excerpts).
    – Rod
    Commented Jan 3, 2014 at 15:45

4 Answers 4


Create a watermark pdf which contains the footer using imagemagick:

convert -background none -geometry +0+0 -fill \#000000 -pointsize 12 label:"From the library of..." -set label '' -page A4 watermark.pdf

It creates a simple pdf ( size: A4 ) with the text From the library of... at the bottom left corner. You might change the font, the position of the text, the size of the text...

This watermark.pdf can be added to ( all pages of ) a pdf file using pdftk:

pdftk input.pdf stamp watermark.pdf output output.pdf

I've used stamp instead of watermark because it overlays on top of the input pdf.

  • Thanks @asalamon74. This looks very promising. I'm away from my desk just now but I'm going to test this out this evening.
    – Rod
    Commented Jan 7, 2014 at 17:19
  • 1
    Sorry for the delay (work crisis). This is pretty much what I was looking for. Thanks!
    – Rod
    Commented Jan 10, 2014 at 16:31

Since you are looking at a linux based solution, the two approaches I would recommend are either doing it during document production (tex would do this just fine and there has been recent discussion on tex.se that would be relevant) or in post production. It has been a while but there are several scripts for adding watermakrs to postscript (prior to printing) that could easily be adapted to your use case when paired with pdf2ps and ps2pdf. My answer to this question may also be helpful.

  • Isn't pdfTeX the common solution for generating PDFs from (La)TeX? AFAIK, that doesn't use PS as an intermediate step.
    – svick
    Commented Jan 5, 2014 at 3:15
  • If you are using tex, it has macros to put content on every page, all you would need to do is a couple lines of customization per copy before running pdfTeX.
    – hildred
    Commented Jan 5, 2014 at 3:58
  • As I mentioned, this is actually pretty easy in TeX/LaTeX, but I'd like something that operates on a PDF level because (1) the LaTeX-to-PDF process if pretty slow (the book has hundreds of images, that's why I'm using PDF in the first place) and (2) ideally I'd be able to use this technique on PDFs generated in other ways.
    – Rod
    Commented Jan 7, 2014 at 17:25

If Perl works for you, the module PDF::Reuse (CPAN) makes it very easy to read from a static PDF and apply textstamps or watermarks to any page or pages within the document. The examples given in the documentation could be copied and amended to your purpose with even fairly basic Perl skill or skill in another language.



There are lots of tools and utilities in the market. Here are some options from which you can choose as per your budget and requirement:

  1. A-Pdf - Paid but trial version available.
  2. Batch PDF Watermark -Free

and few more.

  • Thanks @PM. I've encountered A-Pdf before but I don't think it meets my needs. First, it's Windows only (I'd prefer a Linux-based solution) but I could probably live with that. Second, based on the examples and features lists I've been able to find it seems to be geared toward actual watermarks (e.g., stamping the word DRAFT behind the text of every page) rather than inserting footer text. Maybe it's worth a second look though.
    – Rod
    Commented Jan 3, 2014 at 15:53
  • By the way, that Batch PDF Watermark program looks a little iffy. I think it is likely to contain adware if not outright malware.
    – Rod
    Commented Jan 3, 2014 at 15:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.