Some customer asked my if it was possible to restrict printing and editing a pdf file? Looking over Google I found this. I was wondering if is possible to encrypt a pdf file generated by word automation services (I really haven't checked out much sample code since I haven't installed SharePoint 2010 server yet -I have foundation on my dev machine-) Any suggestions would be greatly appreciated. Thanks in advance
2 Answers
Not out of the box. You would need to write your own PDF processor that accomplishes this either in an Event Receiver where the generated PDFs go. You could also create a custom action that you use instead of the word automation services to convert to PDF and accomplish this at the same time.
-
So basically I would have to open the pdfs programmatically and add the restriction. Ok I'll google If there's anyway to do that using iTextSharp. Thanks!– JaimeCommented Feb 20, 2013 at 17:22
-
You may also want to consider a third party product that has already done all the hard work for you. Works with Word Automation Services as well and includes SharePoint Gui, Workflows and Nintex support. blog.muhimbi.com/2010/12/… (Disclaimer, I work on that product so am biased obviously). Commented Feb 20, 2013 at 18:04
You are talking about Information Rights Management (IRM) which is supported in SharePoint 2010, though not very well for PDFs. If these were office documents, then the IRM would work as expected but PDFs generally open outside of the Microsoft ecosystem in either Adobe Acrobat or the Foxit Reader and to the best of my knowledge, neither of these work well with SharePoint 2010 IRM, though supposedly the Foxit Reader does do PDF IRM for SharePoint 2010 and for SharePoint 2013.
If the client is serious about restricting PDFs, you will likely need to look to a third-party solution or a codeplex one.
Typically, IRM makes assumptions about the environment in order for it to work properly and those assumptions are frequently too restrictive for the business.