Hi.

I'm looking for some ideas to send data directly to printer, considering the
user runs a browser (client side), while the PHP code runs at apache server
(server side). PHP has some printing functions, but only for the Windows
version.

My HTML/PHP program process some input data from a form, then open a new
window with the resulting data. The user needs to print this resulting data
in a blank sheet, but the browser (MS Internet Explorer) prints some headers
and footers besides the data.

I already know how to configure IE to take away the headers and footers
manually, but need to do it automatically, because the user needs IE to
print headers and footers in all other pages.

I tried to do it with the following JavaScript:

--------------------
// JScript/ActiveX - "Modify IE Headers and Footers"
t = new ActiveXObject("WScript.Shell");
t.RegWrite("HKCU\\Software\\Microsoft\\Internet
Explorer\\PageSetup\\footer","");
t.RegWrite("HKCU\\Software\\Microsoft\\Internet
Explorer\\PageSetup\\header","");
--------------------

This script works perfect, but must exist in client side because updates the
windows registry. I mean, doesn't run from server side, and additionally
changes the headers/footers permanently, so the user needs to run a "set
headers/footers" script and then an "unset headers/footers" script, and so
on.

Then, I need something to PHP (or JavaScript, or whatever), to send the data
directly to printer, so I disallow the user to make mistakes, and get for
him a transparent behavior.

Thanks in advance for any idea.

Best regards,
Alex Ortiz.


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to