
: How can I personalize each copy of a PDF to add the reader's name or email address to each page? To discourage readers from uploading it to public file-sharing sites, I'd like to personalize
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.)
Free books android app tbrJar TBR JAR Read Free books online gutenberg
More posts by @Connie
4 Comments
Sorted by latest first Latest Oldest Best
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.
search.cpan.org/~larslund/PDF-Reuse-0.35/Reuse.pm
Free books android app tbrJar TBR JAR Read Free books online gutenberg
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.
Free books android app tbrJar TBR JAR Read Free books online gutenberg
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.
Free books android app tbrJar TBR JAR Read Free books online gutenberg
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:
A-Pdf - Paid but trial version available.
Batch PDF
Watermark
-Free
and few more.
Free books android app tbrJar TBR JAR Read Free books online gutenberg