I have a request for adding the words 'Company Confidential' to all printed material from one of our websites.
The 'printed' material could include documents (that were previously uploaded), or reports.
What I think is needed is a for a watermark to be applied to all documents as they are uploaded, but I am unsure of how to handle the watermark for the other material. Other material being anything that the users uses the File>Print option to print.
But, if there is one way to watermark all printed material I would love to know about it. Does anybody know of a way to do this?
Now, for your documents that are on the system, I would suggest makign them all PDF and then use ITextSharp to watermark them on the fly. What you'll do in this case is with iTextSharp, open the PDF File on the server in memory, toss a watermark image onto
the pdf, then save it in the memory stream before rendering it to the client.
Mark as answer posts that helped you.
Marked as answer by Allen Li - MSFT on Apr 23, 2012 01:20 AM
carriehoff
Member
37 Points
32 Posts
Watermark on all printed material
Apr 16, 2012 05:10 PM|LINK
Hi all,
I have a request for adding the words 'Company Confidential' to all printed material from one of our websites.
The 'printed' material could include documents (that were previously uploaded), or reports.
What I think is needed is a for a watermark to be applied to all documents as they are uploaded, but I am unsure of how to handle the watermark for the other material. Other material being anything that the users uses the File>Print option to print.
But, if there is one way to watermark all printed material I would love to know about it. Does anybody know of a way to do this?
Thanks,
Carrie
bbcompent1
All-Star
32974 Points
8500 Posts
Moderator
Re: Watermark on all printed material
Apr 16, 2012 05:37 PM|LINK
Carrie, I think this is going to be a challenge no matter how you slice it but maybe this thread from StackOverflow might help.
For the images that get downloaded: http://stackoverflow.com/questions/4336583/most-efficient-way-to-watermark-image-c-sharp-on-the-fly
Now, for your documents that are on the system, I would suggest makign them all PDF and then use ITextSharp to watermark them on the fly. What you'll do in this case is with iTextSharp, open the PDF File on the server in memory, toss a watermark image onto the pdf, then save it in the memory stream before rendering it to the client.
bbcompent1
All-Star
32974 Points
8500 Posts
Moderator
Re: Watermark on all printed material
Apr 16, 2012 05:40 PM|LINK
ALong with many other samples on their site (http://www.pdfsharp.net/wiki/PDFsharpSamples.ashx), this sample shows how to watermark the PDF file:
http://www.pdfsharp.net/wiki/Watermark-sample.ashx