Community Tip - Need to share some code when posting a question or reply? Make sure to use the "Insert code sample" menu option. Learn more! X
Hi @KimCheatham
I usually use an AfterLoader functionality and write own code to add a watermark to the PDF.
Simple and without any additional license needs.
PetrH
I wrote a class that will add watermark to pdf. This requires no additional purchase of any software.
The watermark is placed centered along the page’s diagonal and is sized automatically to be 50% of the diagonal’s length. The 50% seems to be a good number. 70% looks good too but this can be whatever percentage you want.
The watermark text can varies based on an attribute value. Most companies that have used my class vary the text based on the lifecycle state.
The text font and color are also set to whatever the customer wants.
The class works on both single and multi-page PDFs. If multi-page pdf the page sizes can vary. The code will accommodate different page sizes within the same pdf.
Finally, because watermarking changes the pdf’s file size I also update the Windchill database column filesize with the PDFs new file size after adding the watermark.
Kudos to @TomU who mentioned the change in file size after watermarking. I had not considered this but it’s a good idea if you want the tool to be perfect.
The code is bombproof, very easy to implement in Windchill with Afterloader functionality and can be easily tweaked to any specific needs.
David