Click here to Skip to main content
15,885,985 members
Please Sign up or sign in to vote.
2.25/5 (7 votes)
See more:
Hi,

I want to show my pdf file online, and i don't want any visitor to download or print that pdf.

Is their any way to block save and print of PDF or can anyone help me with third party tool which will help me achieve this task.

Thanks in Advance.
Posted
Updated 20-Feb-18 5:25am

You can secure the pdf file (password protect) this will prevent the document from being printed. Below is a link to adobe to secure pdf documents. I am pretty sure the open source versions will have a similar feature.

http://help.adobe.com/en_US/Acrobat/8.0w/Professional/help.html?content=WS58a04a822e3e50102bd615109794195ff-7e04.html[^]

As far as preventing someone from downloading the document, this is probably more a function of the web page security.

As Prerak Patel stated above, this does not prevent one from taking a screen capture of the document.
 
Share this answer
 
Comments
Muthu Nadar 14-Jun-11 1:23am    
check some online e-book website like books.google.com
where ebook cannot be downloaded
like that i m lookin
AFAIK, you can't. The control is now in browser so you can't handle that.

But I have a suggestion, you can convert the pdf into flash then you can display it in browser, Users can't print now(Even can't copy-paste).
 
Share this answer
 
What you are looking for is called digital rights management. And yes, you can do that, just like Google and other E-book services.

Google has moved to using the E-PUB format because it is easy to get around most pdf security including the “free” open source pdf security methods.

I wish I could just say
C++
If (MyBook.pdf != Secure) {Secure(MyBook.pdf)};

But the fact is, this is not a simple thing to implement and most of the solutions I have found by using Google. You need to research Digital Right Management and pick the solution that works for you. I’ve even included the link for the Google search for you.

http://www.google.com/#hl=en&sugexp=ldymls&xhr=t&q=PDF+Digital+Rights+Management&cp=18&pf=p&sclient=psy&source=hp&aq=0&aqi=&aql=&oq=PDF+Digital+Rights&pbx=1&bav=on.2,or.r_gc.r_pw.&fp=7073ce229e5c99ed&biw=1089&bih=513[^]

Regards
 
Share this answer
 
Sorry mate, there is no way you can restrict user from printing (any) files. You should not forget that user can anytime use print screen, if nothing else works.
 
Share this answer
 
Comments
Muthu Nadar 10-Jun-11 6:49am    
Thanks for your reply.

But have you seen book.google.com

The same functionality i expect.
I think their must be some open source dll.
Karthikeyan Mathiyalagan 17-Dec-13 2:26am    
Hi muthukumar, this is karthikeyan. actually i am facing same problem in pdf save and print button disable. did you get any solution for that.if you have any idea could you share me.

Thanks
Karhikeyan Mahiyalagan.
XML
Hi, Friend i am also facing same problem, i read so many web sites there is no way to use server side reader.

so i used simple way like i hide the tool bar of adobe reader with using margin-top property in css

<style type="text/css">
.pnl1
{
margin-top:-550px;
}
</style>
<script type="text/javascript">
window.onload= function fun1()
{
var ristrictSite = navigator.userAgent;
if (ristrictSite.match("Chrome")) {
window.open("../Default.aspx", "_self");

}

return true;
}
</script>
<body>
<asp:panel id="pnlPdfHrBook" runat="server" backcolor="White" xmlns:asp="#unknown">



</body>


code at behind page:
====================

string pdfUrl = "policiesBook.pdf";
pnlPdfHrBook.Controls.Add(new LiteralControl("<object id='pdfFrame' style='margin-top:-50px;' height='600px' width='950px' data='" + pdfUrl + "'> </object>"));






this is working success fully but

if we are open this pdf in Google Chrome then it will ask download option

so i restrict this on chrome
 
Share this answer
 
v2
Comments
sdfsdfsdsdfsdfsdf 2-Oct-12 6:30am    
I have open my pdf in iframe in c#. but i want to remove print and save button from it..
How can i, any idea?
ganesh593 6-Dec-12 3:48am    
PDFs will be open in client side only, so we can't restrict that.
the best best solution is convert that in flash

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900