Can not print invoice directly from samsung Tab,HP Printer

We have a customer in distribution business and they want to use samsung tablets & wireless printer for invoicing. But invoice printing is only happening when we convert the invoice to pdf format. Can we print imvoices directly without converting to pdf?

They are using HP wireless printers. We have connected the printer using wifi direct and pdf printing is working. But direct printing is not happening. Please help us if anybody have experience on the same.

I use this custom script when I need to print directly. I usually assign it to custom button.

objWindowOpenResult =“/printview?”
+ “doctype=” + encodeURIComponent(“Batch”)
+ “&name=” + encodeURIComponent(frm.docname)
+ “&trigger_print=1”
//+ “&no_letterhead=0”
+ (me.lang_code ? (“&_lang=” + me.lang_code) : “&_lang=tr”)
if(!objWindowOpenResult) {
msgprint(__(“Please enable pop-ups for printing.”)); return;