12

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.)

Rod
  • 223
  • 2
  • 7
  • 1
    Also, [*Is “soft DRM” a viable option?*](http://ebooks.stackexchange.com/questions/508/is-soft-drm-a-viable-option) asks a distinct but related question. – Rod Jan 03 '14 at 05:29
  • 3
    Putting it on each page might be too much. I've read a book once which contains a "Licensed to XY " 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 Jan 03 '14 at 07: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 Jan 03 '14 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 Jan 03 '14 at 13:54
  • @John: That's look fine for me. – palacsint Jan 03 '14 at 14:30
  • I think you all raise a fair point, but I don't see a muted small-print line in the footer as significantly more distracting than running chapter headings or page numbers. I think the impression it creates is largely a question of design and wording. That said, maybe there's a middle ground, like only adding the text to the first page of each chapter or something like this. – Rod Jan 03 '14 at 15:43
  • 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 Jan 03 '14 at 15:45
  • 1
    For certain kinds of publications, footer, headers, running titles are a traditional and sometimes useful feature: they might remind the reader the title of the present chapter and the like. But he definitely doesn't need to be reminded about his own name and address. (As for the copyright on each page, this was demanded by some lawyer, certainly not by a typographer or book designer, wasn't it?) – DaG Jan 04 '14 at 17:56
  • @Rod: The book which I've mentioned was a non-fiction book too. Adding the text only to the first page of every chapter looks fine for me. – palacsint Jan 09 '14 at 21:55
  • I had a book that did that, but it was nicely done with layers so that you only saw the footer watermark when it was printed. (I guess they wanted to discourage printed copy sharing more than filesharing, which makes sense for a small book) – Frames Catherine White Mar 08 '14 at 03:37
  • Being 32signals mentioned i think their philosophy on this: we care less about people who would not pay for this product anyway then people who are our costumers. I.e. it is more important to not annoy people who own the copy, and err on this direction, than to prevent every single person from copying your product. By the way bug thumbs up for not doing DRM. – Greg Aug 27 '14 at 06:25

4 Answers4

7

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.

asalamon74
  • 1,094
  • 1
  • 9
  • 17
  • 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 Jan 07 '14 at 17:19
  • 1
    Sorry for the delay (work crisis). This is pretty much what I was looking for. Thanks! – Rod Jan 10 '14 at 16:31
3

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.

hildred
  • 285
  • 1
  • 3
  • 10
  • Isn't pdfTeX the common solution for generating PDFs from (La)TeX? AFAIK, that doesn't use PS as an intermediate step. – svick Jan 05 '14 at 03: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 Jan 05 '14 at 03: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 Jan 07 '14 at 17:25
2

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.

http://search.cpan.org/~larslund/PDF-Reuse-0.35/Reuse.pm

jorourke
  • 126
  • 3
0

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.

Anthon
  • 7,621
  • 3
  • 22
  • 56
PM.
  • 101
  • 2
  • 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 Jan 03 '14 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 Jan 03 '14 at 15:56