Disable pdf download and save option

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.

483 6 6 silver badges 21 21 bronze badges asked Apr 16, 2016 at 16:08 Saurabh Kedia Saurabh Kedia 61 1 1 gold badge 1 1 silver badge 4 4 bronze badges Actually your pdf is already downloaded to user's machine if they can see it. Commented Apr 16, 2016 at 16:11 wat about using third party app. Commented Apr 16, 2016 at 16:14

It would be a long trip if you're going to install a third-party app to every visitor's machine. This is not achievable, the only way is never show the file at the first place.

Commented Apr 16, 2016 at 16:17 Don't upload the pdf? Commented Apr 16, 2016 at 16:40

You can disable printing of any PDF file using it's security properties. But you cannot prevent users from downloading it. As Teemu notes, if they're viewing it in a browser, by definition they've downloaded it.

Commented Apr 16, 2016 at 21:45

4 Answers 4

Document load was not successful.

Make sure you add #toolbar=0 in the data attribute after your pdf file.

answered Mar 5, 2018 at 18:21 Hallai Seiler Áron Hallai Seiler Áron 123 1 1 silver badge 6 6 bronze badges

It only disables the download button, It doesn't disable save as option and print option on right-click.

Commented Aug 24, 2020 at 13:46

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.

answered Jan 30, 2017 at 6:57 43k 5 5 gold badges 70 70 silver badges 104 104 bronze badges

Google Drive can disable the PDF functions to download, print and copy as of 2015.

Note however, that users can still print using the browser print function.

I have many e PDFs via a HTML link to the general public which has this functionality.

answered Jun 4, 2018 at 2:06 IlludiumPu36 IlludiumPu36 4,274 11 11 gold badges 64 64 silver badges 104 104 bronze badges

As others have noted, once the pdf is being viewed by the user, they can save it.

If you are just wanting to obfuscate the download, you could disable the menu as described but to truly prevent downloading of the PDF, then only thing you could really do is a little crazy but not impossible.

You could convert it to images and show those instead. Not an ultimate solution as they would still be able to save each image, but at the very least they would not get a PDF file from it (or at least if they are smart enough to convert the images to one, it would not be the same pdf file or content)

There are many tools to do this and you'd have to implement a viewer with paging but this might achieve what you want.

answered Apr 17, 2019 at 17:10 Jean-Serge Gagnon Jean-Serge Gagnon 9 2 2 bronze badges

Linked

Related

Hot Network Questions

Subscribe to RSS

Question feed

To subscribe to this RSS feed, copy and paste this URL into your RSS reader.

Site design / logo © 2024 Stack Exchange Inc; user contributions licensed under CC BY-SA . rev 2024.9.4.14806