print pop-up page

Would it be possible to create a customized control or similar way to do a JavaScript print of the current window?

For example would this work?

source: Using window.print() to print a document

Need: I would like to print the entire content of a pop-up window even is if scrolls down.

Hi Demos,

You can of course define a custom control, which triggers the print. But the printout will most likely not look as intented. It totally depends on your specific layout. Also scrolling down while printing does usually not come for free.

Best Regards,
Christine