Disable pdf download and save option
21,666
Solution 1
Try this:
<object width="100%" height="100%" type="application/pdf"
data="yourpdffile.pdf#toolbar=0" id="pdf_content"><p>Document load was not
successful.</p></object>
Make sure you add #toolbar=0 in the data attribute after your pdf file.
Solution 2
You can use iframe
to your own version of PDF viewer.
Use pdfJS
and when showing viewer.html
just remove these buttons.
If user is viewing it on it's own tool, than you can't control it.
Author by
Saurabh Kedia
Updated on April 18, 2020Comments
-
Saurabh Kedia about 4 years
I have a PDF file being viewed on the browser.
I want to disable Save, Download and print option of the PDF file.
Please help.
-
Akshay Raut over 3 yearsIt only disables the download button, It doesn't disable save as option and print option on right-click.