cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

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

Translate the entire conversation x

Watermarks Not Working for Models and Additional Files PDF of Drawing

KimCheatham
4-Participant

Watermarks Not Working for Models and Additional Files PDF of Drawing

I am using Windchill PDMLink Release 12.1 and Datecode with CPS 12.1.2.0

I've created the watermarks for the different types in the Watermark Editor.
I've added them and configured the watermark map in Creo View (10).
I modified the user_prefs and renamed to server_prefs.xml and uploaded that with the .ini files to the worker in Windchill.
Watermarks are only appearing on Creo drawings when opened in Creo View - Models are not getting watermarked.
I would also like to watermark the downloadable PDF "additional file".
I am hoping to do this without having to purchase Adobe Experience Manager.
2 REPLIES 2
HelesicPetr
22-Sapphire II
(To:KimCheatham)

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

@KimCheatham 

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

windchill.developer@yahoo.com 

Announcements

Top Tags