Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
167 views
in Technique[技术] by (71.8m points)

google chrome - Disable the possibility to print a PDF in a browser running on a kiosk-mode computer

I'm developping an application which will be used inside a web browser (Firefox or Chrome). One part of this app will display a PDF. However, with the standard PDF viewers, there are some functionalities included that I don't want the user to have (e.g. print, save to disk, ...). I've found this great project about a customizable pdf viewer for mozilla. This allows me to restrict the user's possibilities. Now I'm wondering if it's possible to achieve the same in Google Chrome. So far I haven't found anything about customizing the standard PDF viewer of Chrome. Is there anyone who knows a way to do this, or knows a customizable viewer like the one I've found for mozilla? Thank you.

Update:

The browser will run in kiosk mode, so the user will not have access to any function other than viewing a web page (no address bar, no menu, nothing). Also, no keyboard will be present, since the application will be used on a touch screen.

Update 2:

First of all, why has this question been moved from programmers to stackoverflow?? When I ask this type of 'open' questions here, they get closed instantly. Thanks for the downvote. I guess, for people, questions that can't be answered with 3 lines of code are too hard.

Second, concerning the printing of PDF: I see some people mentioning ways to print PDF files. The user will have none of these options available because:

  • There will be no printers available in the eventual setup of the system.
  • There will be no keyboard or mouse, only a (limited) touch interface.
  • The webpage will not be available from anywhere except the intented location.
  • The user will not be able to access the underlying OS.

Disabling the ability to print is not hard, but I don't want the user to think he can print. If the print icon remains on the PDF viewer, the user clicks it and nothing happens, this will lead to frustration and irritation. By showing only the buttons that actually work, will lead to a better experience of using the application.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

The URL to the PDF is enough to print and save the file, inside or outside the browser. The only way to completely prevent the user from having those options is to present the PDF within your own viewer, such as a Flash application (e.g. Scribd).


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...