CodeIgniter Forums
print on a printer server - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forum-20.html)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forum-23.html)
+--- Thread: print on a printer server (/thread-36246.html)



print on a printer server - El Forum - 11-26-2010

[eluser]Giga[/eluser]
Hi,
I am using codeigniter for develop a little management system.
I'm fighting with this problem:
When a customer clicks on submit, are extrapolated data from a DB then the server will print to a printer attached to it.
I try on linux :
Code:
system or exec('lpr path_file/file -Pprinter');
//This command works if running from a terminal but in file php, with system or exec, nothing do

On windows 7 with:
Code:
system or exec('print /D:printer path_file/file');
//This command doesn't works in prompt and dosen't work in file php, with system or exec, nothing do

Help me!!