Click here to Skip to main content
15,891,136 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
C#
Hi All,

I have a web service which will return pdf stream for a given document id and I will set the content type to application/pdf and write the out put to <Object> (Html5)upto this point I am done and OK! 
My problem is :
My client requirement is to disable the pdf toolbar buttons except the print button in  <Object>, is there any way using jQuery/JavaScript to disable all the PDF toolbar buttons?

Thanks in Advance.


What I have tried:

JavaScript
$("paper-icon-button").remove("#download");
                            $("#download").detach();
Posted
Updated 14-Jul-16 0:23am
Comments
F-ES Sitecore 14-Jul-16 6:54am    
How do you know which pdf viewer they are using? Maybe their viewer doesn't have buttons?

If you're trying to stop people saving your PDF locally then don't bother, look into PDF protection services\apps.
ErBhati 14-Jul-16 8:02am    
viewer has buttons in toolbar. and it does not depend on adobe.

Richard Deeming 14-Jul-16 9:49am    
If you are explicitly using PDF.js[^] to display the PDF, then you can modify the toolbar in the viewer as much as you want. However, it won't stop a determined user from downloading the PDF directly.

If you're relying on the browser's default behaviour for displaying the PDF file, then there's nothing you can do to control it.

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