Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C# ASP.NET VB.NET
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 9-Jun-11 20:29pm
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 3

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.
  Permalink  
Comments
Muthukumar Nadar at 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
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 5

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).
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 6

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
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
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 8

I don't know, but they can disable download button
 
http://tailieu.vn/doc/ielts-write-right.1519542.html
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

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.
  Permalink  
Comments
Muthukumar Nadar at 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 at 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.
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 7

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
  Permalink  
v2
Comments
sdfsdfsdsdfsdfsdf at 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 at 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)



Advertise | Privacy | Mobile
Web02 | 2.8.1411022.1 | Last Updated 23 Sep 2013
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100