Hide/disable Download Button On Chrome Pdf Viewer
Solution 1:
You can do it by using embed tag
by making #toolbar=0 you will be able to hide the download and print button.
Solution 2:
If it's only for not so tech-saavy users, you can disable download in the chrome pdf viewer by generating one-time usable unique urls eg. with a query string parameter that is stored on server and allowed to be used only once. The download button does download a second time and will fail in this case. This is however an implementation detail in the chrome pdf viewer that might change. If the user does not have a pdf viewer in the browser or it is disabled, the file will simply download by default.
You might want to try pdf.js, that will render and not download in any browser, but tech-saavy users will still be able to get the document. It is probably also less performant than the chrome pdf viewer.
If you turn the content into images, users can still take the batch of images and combine them into a pdf, however in this case the text is harder to recover, but still possible with OCR.
If you want to make it harder to copy the content or just detect it, you could also use watermarks in your downloaded images or incorporate steganography to identify the user who made the copy based on the released file found in the wild. Be aware that watermarks can always be removed, usually very easily from PDF files and it is a bit harder but still possible to remove from images. Carefully designed hidden identifiers (steganography) can also be removed but it has to be found first and usually users don't look when a document is not obviously stamped.
Solution 3:
Since you are delivering pdf file directly into the browser, displayed using Adobe Reader ActiveX, how can it be possible to prevent file download, since the files are displayed after downloaded into your temp directory?
So it is not possible using ANY JavaScript library.
The only way to secure your master PDF files is by creating Images for each page and present those to the user on the web via your own interface (html, flash etc).
You may use ImageMagick along with GhostScript for this.
Post a Comment for "Hide/disable Download Button On Chrome Pdf Viewer"