Receipt Printer - Print From Webpage
Solution 1:
If you are willing to load a java applet, jzebra can print directly to the Epsom TM series thermal printers to COM1 port using the Generic Text driver as you've described.
https://github.com/qzind/qz-print
The problem you are encountering is not uncommon. Generic/Text bypasses the PostScript (2D) capabilities of the Epson print driver.
If using Generic/Text, Epson uses the ESC/P programming language. You will find many tutorials on the internet for printing in this format, and jzebra has more information about this style of "RAW" printing here:
https://github.com/qzind/qz-print/wiki/Raw-Printing
Edit:
To get this working, simply setup your receipt printer as the default printer and rename it as "zebra":
Then simply download the qz-print library, put the jar file in the project directory and hey presto:
<inputtype=buttononClick="print()"value="Print"><appletid="qz"code="qz.PrintApplet.class"archive="./qz-print.jar"width="100"height="100"><paramname="printer"value="zebra"></applet><script>functionprint() {
qz.append("PRINTED USING JZEBRA\n");
qz.print();
}
</script>
Solution 2:
This is very old question, but it is still difficult to find a good solution. I used to use QZ Tray solution (as Tres Finocchiaro has described), but now I think I've found a better one that provides full control over the process:
- Register custom protocol (like "https", "http", "mailto") named, for instance, "print". It is done using registry editor in Windows.
- Write a custom protocol handing application which will be automatically executed by Windows when somebody is going to open a link like "print://any/parameters/go/here".
- Implement printing in your application. I'm using C# and built-in PrintDocument class, so it is extremely simple.
Now I can just create a link with href like "print://invoice/1234" and then parse this URI in your application and print whatever you need. It works even from a command line.
Here you can get more information.
Solution 3:
a solution: Have a look at jQPrint
EDIT:
Have a look at jQuery or other javascript plugins that do this, try jQPrint if it's still supported or try searching if the link is broken. I realise this is an old answer and they type of answer that is no longer permitted. Hopefully this helps.
Post a Comment for "Receipt Printer - Print From Webpage"