Watermarking a PDF
Date: February 11, 2012
I keep meaning to post notes on watermarking with PDFCreator. The weekend has arrived and my excuses are drying up. So...
Before scaring y'all, let me reiterate my willingness to watermark any pdf you send me - subject to free-time constraints. Unless there's a huge demand, this is perfectly workable. You can attach a PDF in an email to john (at) wardsattic (dot) com. I'll dump my watermark on it and send back the result in a new file.
But for moderately tech-savvy Windows users only (sorry) who feel adventurous...
There's an open source piece of software called PDFCreator. It's freely available at http://sourceforge.net/projects/pdfcreator/. I didn't write it, and can't guarantee anything, but it's been working fine for me on a couple different systems and seems to have a reasonable following on the Net. Installation should be normal.
1) Once installed, it acts like a printer. When you choose to print a document, you can choose PDFCreator as the "printer" destination. The output just ends up in a PDF file instead of on paper.
- Title pages -
2) The software does not automatically save each document separately. Rather, when you print to PDFCreator, you get a new window with choices what to do with the output. You can (A) Cancel the job, (B) "Wait - Collect", (C) Set options, (D) Email the document (never tried that one), of (E) Save the document. You also get a drop-down that allows you to choose the "Profile" for the job.
If you choose "Wait - Collect", PDFCreator opens a "PDF Print monitor" listing your current print jobs. Any subsequent jobs show up on the monitor until you do something with them. If you want to merge output from more than one document, print them to PDFCreator in the desired order, then select the jobs and click Combine, or just click Combine All. The result is that the several jobs are now headed for one document.
While waiting, the "printer" is in a stopped state. When you click on the "Printer Stopped" icon (or clear it on the printer menu), the job window reappears, allowing you to save to PDF or wait-collect some more. Assuming you've combined things as desired, choose "Save" and specify the output file name and location.
Why do I care? I've been running Finale PrintMusic 2007 for quite a while and had no idea how to add a title page to my printouts. Now I just create a title page with my favorite word processor, print it to PDFCreator, "Wait", then print from Finale, "Combine", and "Save".
- Watermarks -
3) The bad news for watermarks is the setup required. The good news is that (hopefully) you only perform the setup once.
The watermarking process requires a second piece of software called PDFtk (or PDF toolkit), available at http://www.pdflabs.com/tools/pdftk-the-pdf-toolkit/. It hasn't caused me any problems, but again, installing is your choice. Bail if it doesn't look right. PDFCreator will expect PDFtk to be installed in the c:\pdftk-1.12\ folder, but you can put it where you want if you're willing to edit the watermark script.
Presumably, you don't want ALL your PDF documents to have a "Do Not Copy" watermark. So you need to create a "Review Copy" profile which will do the watermarking.
- Open PDFCreator and choose Options. On the top of the page you'll see the dropdown for choosing the profile. It will say "Default" unless you've been messing with things. We want the default profile to behave normally (no watermarks), so click the "Add profile" button (plus sign) to the right of the profile name. Pick a name such as "Review Copy" for your new profile.
- Now we add the watermark instruction. If your profile is still set to "Default", change to "Review Copy" on the dropdown. Select "Actions" on the left of the options window, and on the right choose "Action after saving". Check the "Action after Saving" box, then choose "AddWatermarkToPDF.vbs" from the action dropdown. Leave the rest of the parameters alone. Save the settings and you're ready to test.
- Operations -
Print a file to PDFCreator. When the job window (Wait, Save, etc.) opens, change the profile from "Default" to "Review Copy". Collect documents if desired, then save to PDF. The output file should automatically have a watermark added - on a good day, God willing and the creek don't rise.
- Troubleshooting -
1) "It doesn't work!" PDFCreator expects to find watermark.pdf in the Program Files\PDFCreator\Scripts folder and PDFtk.exe in the c:\pdftk-1.12\ folder. It will warn you if it can't find them. You have the choice to move the files where PDFCreator expects them, or to modify the script to point to the correct location. If you choose to edit the script, it's in the Program Files\PDFCreator\Scripts folder. Make a second copy before messing with the original, and use Notepad or a plain text editor (not a word processor). The script will be very unhappy if your WP throws in formatting marks.
2) "I don't like the watermark." The script uses the watermark.pdf file in the Scripts folder. If you don't like it, make another one. Rename the existing file to something like "oldWatermark.pdf", then put your own version in the Scripts folder. You can create it with any handy program, then make it a PDF by sending it to PDFCreator.
3) "I messed up all my Default profile by mistake, botched the new profile, etc." The Options page has a "Restore All Settings" button at the bottom. It won't fix watermark or script files you've mangled, but will reset your profiles.
4) "Aaaarrrrrgh - major frustration" If it just ain't working, don't use it.
And that's about it. At this point, there's undoubtedly someone out there itching to try it, five people ready to tell me a better way, and a small horde preparing email attachments for me.