Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Spooling Data to Printer

Status
Not open for further replies.

davecapone

Programmer
Oct 3, 2000
48
US
Does anyway know anyway to automatically spool a image file to a printer without user intervention?
 
Directly through asp.net, I do not believe that it is possible. This is because .net code runs on server side and not client side. A workaround to this may be by use of javascripting. If you want to print a picture, consider using the OnLoad event of the Body object, using it to open another window and print containing the picture that you want to print:

<body OnLoad=&quot;window.open('print.aspx','','');&quot;>

...And in print.aspx

<script language=javascript>

function PrintMe()
{
window.blur(); //set this to background object
window.print();
window.close(); //close it before user ever sees it
}

</script>

<body OnLoad=&quot;PrintMe();&quot;>

Hope that helps =D


-----------------------------------------------
&quot;The night sky over the planet Krikkit is the least interesting sight in the entire universe.&quot;
-Hitch Hiker's Guide To The Galaxy
 
I'm actually looking for the data output to occur server side.

I'm pretty sure its possible using the system.Drawing.Printing Namespace

and the System.Drawing.Graphics namespace

Just wondering if someone had done it before or knew of anyplace to see some examples.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top