Friday, January 28, 2005

Printing From XUL Applications

I've been working on something spiffy for work, but I had one major problem. I could not print anything from the screen in a real-life printer. Could I? Firefox has flags disabling printing for XUL documents.

Simplest thing in the world.

window.print()

The trick is to use a browser control, and redirect to the printable HTML. Use a nice CSS stylesheet, and wham, bam, thank you m'am, you have a real world application that will be replacing my work's entire Point of Sale solution. Well, eventually.

Take a look at the demo or peek in the CVS.

Technorati Tags: Cool, Geek, XUL, Javascript, PHP
Post a Comment