PDA

View Full Version : Mozilla - always_print_silent



digDug
01-10-2005, 09:22 PM
The local library has a touchscreen kiosk that displays and prints information about the community. One of their goals is to bypass the "Hello children, would you like to print 1 million copies?" print dialog. The information is web based, so I configured Mozilla to run full-screen and added the following to /usr/lib/mozilla/greprefs/all.js
pref("print.always_print_silent", true);

Mozilla comes up without any trace of toolbars or buttons. The web pages use window.print(); javascript links as a replacement for "File,Print" or the actual print button. When a patron clicks a "Print" hyperlink - the following error appears: "There was a problem printing because the paper size you specified is not supported by your printer."

To fix the error I just turn on the toolbars, hit the physical "Print" button, and turn the toolbars back off. The error will not appear until the next reboot or until someone exits Xwindows. That is to say - once you use the actual "Print" button - the javascript print hyperlinks begin working and keep working until the power blinks.

It seems that the Print button initially passes something to the OS that the javascript links cannot. Say for example there is a group of environment variables that start out null until the Print button assigns values to them. Should I look at recompiling Mozilla? Is there a shell script that will set those environment variables ahead of time?

Thanks for reading so far. Here are some questions that may come to mind:
-Have you looked over the about:config settings? Yes. I have set Letter as the default paper size and experimented with some of the other preferences.
-What window manager are you using? None actually. Although the problem is the same whether Mozilla runs by itself or within BlackBox, KDE, etc.
-What about CUPS, can you print from other applications? Printing is not a problem. This seems to be a Mozilla issue.
-Have you tried a different browser? If there is another free browser that supports Flash, runs completely full screen, and prints without any dialog - I am ready to try it out
-What distro are you using? Knoppix installed to a hard drive.

Thanks again. Save the trees!