Prevent pdf download chrome






















This is a in-built PDF viewer tool of Chrome and have simple features like rotate, download, print, full screen mode, zoom in and zoom out function. You can also click on the page and enter the page number to go to that page. Though, it has a download option, you need to view and then download the file. Also when the document contains confidential information, it is not a good idea to look on the browser with people around you.

For disabling Chrome PDF viewer and to simply download files, you have to follow steps given below:. Editorial Staff at WebNots are team members who love to build websites and share the learning with webmasters community. Connect with us in Facebook and Twitter. Google Analytics is the top most and free web analytics[ Gmail has an astronomical million users around the world. Thank you. Chrome PDF Viewer. Open Chrome Settings. View Advanced Settings.

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.

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. 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. Stack Overflow for Teams — Collaborate and share knowledge with a private group. Create a free Team What is Teams? Collectives on Stack Overflow. Learn more. Asked 5 years, 3 months ago.

Active 3 years, 4 months ago. Viewed 23k times. The PDF is currently being opened in a new window via : window. Improve this question. Whiskeyjack Whiskeyjack 31 1 1 gold badge 1 1 silver badge 4 4 bronze badges.

Add a comment. Active Oldest Votes. Improve this answer. You may go through veryinteractivepeople Hope this helps. Patrick Mlr Patrick Mlr 2, 2 2 gold badges 14 14 silver badges 25 25 bronze badges.

Hi, I don't need to actually prevent downloading the file, as that is not possible since like you said it is in the temp file system. I just want to hide the toolbar in the chrome PDF viewer to satisfy an arbitrary client request. If I inspect the element using developer tools and then add display: none it does the trick, but I'm not sure how to set that by default.



0コメント

  • 1000 / 1000