i want to print invoice on AJAX response without opening print dialog box. which library or plugin should i used for this purpose.
Asked
Active
Viewed 4,880 times
1 Answers
1
You cant print without opening the print popup. use jZebra library from google Jzebra API
and use applet to print the receipt and your data should be in raw format
<input type=button onClick="print()" value="Print">
<applet name="jzebra" code="jzebra.PrintApplet.class" archive="./jzebra.jar" width="100" height="100">
<param name="printer" value="zebra">
</applet>
<script>
function print() {
document.jzebra.append("PRINTED USING JZEBRA\n");
document.jzebra.print();
}
</script>
or
Print from the server. If this is a cloud server, ie not connectable to the receipt printer then what you can do is From the server generate it as a pdf which can be made to popup a print dialog in the browser Use something like Google Cloud Print which will allow connecting printers to a cloud service

Taufik Pirjade
- 380
- 6
- 26