[SalesForce] Making PDF viewable but not downloadable on customer community

I'm looking for recommendations for the best way to make PDF documents viewable on customer community but not downloadable. I know that Salesforce Content can be restricted that way but I wasn't sure if it could be applied to community. I also thought about PDF's attached to Knowledge articles in the community, but I wasn't sure if you could dis-allow downloading with Knowledge.

Best Answer

From a practical standpoint, a PDF has to be downloaded into the browser for it to be opened by the Acrobat Reader plug-in. Once it's there, someone can always do a "Save As" in order to save the document locally.

Unless you render the PDF page by page as VisualForce content as opposed to PDF content, that would seem to be the only way you could prevent a user from downloading the document as a PDF. Otherwise, its all going to be handled by browser plug-ins.

I think you're going to need to do something server side to work around this issue. I've not done this before, but I'm guessing you'd need to create a controller to process each page as a blob. Someone else may have a more specific suggestion on the details of how to do what you're asking. I hope this at least helps provide some guidance or general direction for you.

Related Topic