I have Created Custom web Application using Java Servlets, and Connected to Alfresco Repository using CMIS.
I also have created one simple workflow using activity.
Now My requirement is, In workflow after view or download document i want to dynamically set the watermark on only downloaded copy. but not on original document which is in the repository.
How can i achieve this using CMIS.
Please provide sample code if you have.
Thanks in Advance...
Once you have the document downloaded, you are dealing with a straight Java File object at that point. CMIS is out-of-the-picture. You can use any library that knows how to work with PDFs to add a watermark. One example is iText.