Like Aparajita said all you can do is call window.print(). The best
way we found of dealing with printing is to create a new window with
the content you want, with window.print() in the script tags so as
soon as you show it it prints.
Here is a snippet of code you may find useful:
//Put this as "close" to the triggering of the button or even which
causes the print dialog to be shown. We create the window here as
safaris popup blocker blocks those that it thinks arent triggered by
some user input.
window.win = null; //This resets the window if it was already set,
if this isnt done the print window will only open once
window.win = window.open("#", "printwindow",
"menubar=no,location=no,resizable=yes,status=no,centerscreen=yes,width=1545,height=1100");
window.win.document.title = "Report";
//Put this when you want to display the window. In my case this is in
a delegate method from a cpurlconnection (hence the need for the above
hack)
if (window.win)
{
var reportURL = baseURL + reportViewURL + "/" +
data["print_id"];
window.win.location = reportURL; //could also do
window.win.document.write("Some html");
} //Otherwise window couldnt be set for some reason, most
likely a popup blocker.
Jon
On Jun 10, 6:32 am, Aparajita Fishman <
aparaj...@aparajitaworld.com>
wrote: