I have developed a POS application using codeigniter, I want to print a bill using printer, can any one help me to pass the printer name to php/javascript code to be get printed in, any help will be appreciated
Asked
Active
Viewed 320 times
0
-
duplicate of http://stackoverflow.com/questions/7242535/how-to-print-on-client-printer-from-server-using-php ? – mplungjan Jun 04 '15 at 13:03
-
everyone is correct that you can't automatically print things through a users browser, you can only open up the print context menu and they need to hit print. But if you have a central printer for a bunch of registers you can setup a php print server that automatically prints. Search `php print server`, there are some open source solutions that might work for you – RightClick Jun 04 '15 at 13:58
-
Thanks for your reply – khan Jun 04 '15 at 14:13
1 Answers
-2
You cannot do that directly but u can use
window.print()
and hide the elements u dnt want to get printed by ur css
@media print
{
.no-print, .no-print *
{
display: none !important;
}
}

Dinesh Patil
- 1,042
- 10
- 13