php - Can print web page using POS/Receipt printer? -


i have intranet web page consist of text (no images). need print page using receipt\pos printer print it.

is possible or not?

thanks

sure. 2 simple ways it, depending on how interference you're willing accept in interface.

firstly, can use javascript trigger receipt page/iframe print. option little klunky, requires cashier confirm print in system dialogue.

but secondly, have option of sharing each station's printer on network. server-side component can print directly it. , if it's *nix server, it's pretty easy once each station's printer has added / shared server. in php (with cups installed, imagine):

// attempt pipe 'lp -d printername' if (`echo "{$text}" | lp -d {$printer_name}`) {     // print successful     return true; } else {     // print failed     return false; } 

if you're running windows server, it's more complicated.


Comments

Popular posts from this blog

c# - How to set Z index when using WPF DrawingContext? -

razor - Is this a bug in WebMatrix PageData? -

android - layout with fragment and framelayout replaced by another fragment and framelayout -