I posted a while back about using a third party tool (PDFCreator) to generate PDF files from NotesDocuments. Now my client asked me to apply a watermark to these PDF documents. There’s no native support for watermarks in PDFCreator. I have found an executable called PDFTK.exe (PDF Tool Kit) that does a nice job. The downside is that I have to make sure the client using my application has this executable installed somewhere on his machine. I wonder If I can carry the executable in the NSF instead of having 2 different files to install. As for running the executable directly from the NSF I don’t think it will work, but I can just extract the file to a temporary folder on the client.
If you have any advice, please tell me.
Thanks in advance.
Rem
Subject: try ePDF… Re:Apply a watermark to a PDF
I found www.ePDF.com for Domino to work really well, and it has dozens of PDF customization features inclucing watermarks. It runs as a Domino plug in plus some Windows Services. You point it at any number of dbs\views on the server for jobs, and creates PDFs and puts them back into a specified RT field on the source document. The pricing model is by volume per hour, so it can get expensive if you’re doing many hundreds or more per hour.
Subject: Apply a watermark to a PDF
In general it is possible, although kind of awkward. What you can do is attach the .exe file to a form. Then get the NotesForm object by calling the NotesDatabase.GetForm method. Check the NotesForm.NotesURL property and parse the document UNID out of that value. Then call NotesDatabase.GetDocumentByUNID method to get the form again, but this time as a document. Now use the NotesDocument.EmbeddedObjects property to find the attached .exe file. Extract it to a temporary directory and run it. The Environ$ function can give you the path to the temp directory.
Subject: Apply a watermark to a PDF - Try Lowagie iText from Java agent
http://itext.ugent.be/library/api/com/lowagie/text/pdf/PdfStamper.html