3

I am looking to provide some pdf files for download. Its almost impossible to stop these being reprinted once downloaded, but I would like to add the name of the purchaser to the bottom of each page in the format : Licenced To:xxxxxxx so that in the event of the files being passed around people will see that they are an illegal copy. I accept that even this could be masked out and then photocopied, but it makes more work on a 400 page document

Is this possible please?

6
  • 1
    Do note that in the same way you are editing a pdf file by appending 'licensed to', someone else might edit the pdf to remove this notice, without photocopying anything. Mar 3, 2013 at 13:42
  • 1
    @mpy: There are, but the encryption will also prevent your clients from reading the pdf file. That seems counterproductive; you might as well not provide them in the first place. If you provide the decryption keys as well, your protection scheme has just been broken. Mar 3, 2013 at 16:13
  • 1
    @MarcksThomas: You can definde different user (can read, print, annotate or whatever the owner allows) and owner (can manipulate document) passwords.
    – mpy
    Mar 3, 2013 at 16:24
  • 1
    @mpy: Password protection will not prevent people from printing or editing the document, provided they can read it. That is beyond your control. Similarly, no password protection scheme, no matter how clever, could prevent you from writing this paragraph down on a piece of paper yet allow you to read it, because you control the pencil, the paper and now the message. Mar 3, 2013 at 19:06
  • 1
    @MarcksThomas: I don't agree, but probably we're talking at cross purposes, so that's my last comment here. Take a look at File->Properties->Security, there is a finely graduated list, what the reader is allowed to do or not. Also this Wikipedia section explains want I mean: en.wikipedia.org/wiki/PDF#Security_and_signatures I agree you can make screenshots or whatsoever, but as the OP pointed out, that's a pain in the neck for 100+ pages. (That this feature is not secure as some cracking tools are out there is another topic, but at least it challenges the reader a little bit.)
    – mpy
    Mar 3, 2013 at 19:45

1 Answer 1

4

Short answer: Yes, it's possible.

A little bit longer:

What comes to my mind at first is pdftk, which can overlay a PDF file with another, see http://www.pdflabs.com/docs/pdftk-man-page/:

pdftk in.pdf background back.pdf output out.pdf

background < background PDF filename | - | PROMPT >

Applies a PDF watermark to the background of a single input PDF.

Pdftk uses only the first page from the background PDF and applies it to every page of the input PDF. This page is scaled and rotated as needed to fit the input page. You can use - to pass a background PDF into pdftk via stdin.

If the input PDF does not have a transparent background (such as a PDF created from page scans) then the resulting background won’t be visible — use the stamp operation instead.

or

pdftk in.pdf stamp back.pdf output out.pdf

stamp < stamp PDF filename | - | PROMPT >

This behaves just like the background operation except it overlays the stamp PDF page on top of the input PDF document’s pages. This works best if the stamp PDF page has a transparent background.

At that stage it's not completely automatized, you still have to create the file back.pdf by hand. A possible automatic solution is to create a PS file with a template text at the desired position, search&replace that text (in un*x with sed) with customer's name and process the result with ps2pdf. [EDIT: See my second answer for a step-by-step howto.]

But I'm sure there are more elaborate tools... lot of scientific journals do exactly the same. One of those PDF files identifies its producer as

Producer:       StampPDF Batch 4.1.1 Solaris SPDF_1116

So StampPDF seems to be a professional software for exactly that purpose.


I liked that challenge. So here's a step-by-step howto:

  • Create PS template. That's a littly bit tricky, the text must be contained unaltered. (Export PS with Text as Text and do not include font -- phrasing as in CorelDRAW). Here is an example: stamp.eps

enter image description here

  • Use sed to insert customer's name and current date, export to PDF in one go. Of course, customer's name can come from DB-Query or what so ever...

    sed "s/to C/to Alex/;s/on D/on $(date)/" stamp.eps | ps2pdf -dAutoRotatePages=/None - stamp.pdf

enter image description here

  • Use pdftk to stamp this onto your original PDF file

    pdftk original.pdf stamp stamp.pdf output webversion.pdf

enter image description here

You must log in to answer this question.

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