Reply to Re: Print to printer

Your name:

Reply:


Posted by morten.overgaard@gmail.com on 11/21/06 19:54

wesley@ispace.co.za wrote:
> Hi All, i want to print the contents of my form to a printer when the
> page loads.
>
> This code works :
> <body onLoad="self.print();">
>
> but i want to print automatically, without asking me to confirm
> printing or choosing my default printer.
>
> Can this be achieved? If so, how?
>
> Thanks
> Wes

Hi

Haven't tried this, nor heard of anyone who has, but the shell_exec()
function in PHP allows you to execute shellcommands on a *nix server.

You may do similar things running on a win-server, however, it has to
go through the cmd.exe-file. e.g. <?
shell_exec("C:\\path\\to\\cmd.exe /c C:\\batchfile.cmd");
?>

I'm really not sure about this, but I remembered reading about this,
and seeing that you didn't get a positive answer.
Please correct me if I'm wrong

Morten

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация