thermal-printer

Printing a bitmap on a TSC printer

假如想象 提交于 2020-01-06 07:42:23
问题 I try to print image on tsc tdp-225 printer using the android device via OTG. This is example from documentation for printing simple bitmap image on tsc printer . This is my implementation . And this is what the printer has printed Maybe someone has already encountered this problem. Printing a monochromatic bitmap using PUTBMP also does not work. 回答1: fun String.hexStringToByteArray(): ByteArray { val hexStr = this.replace("-", "") var result = ByteArray(hexStr.length / 2, {0}) for(i in 0

ESC/POS Command for Printing Chinese Character

牧云@^-^@ 提交于 2020-01-06 05:30:08
问题 Printer Model: Epson TM-T88V ESC/POS Command Guide (look at P.115): http://download.delfi.com/SupportDL/Epson/Manuals/TM-T88IV/Programming%20manual%20APG_1005_receipt.pdf I've searched so many posts about this funcionality but still can't find a solution to print Chinese properly. Below is the code I've tried so far (still prints garbles text): Socket socket = new Socket("192.168.1.111", 9100); //one socket responsible for one device PrintWriter printWriter = new PrintWriter(socket

Is there any way to print from Google Chrome to thermal printer (escpos) in local network without using apps like QZ tray?

余生长醉 提交于 2020-01-06 04:59:46
问题 Are PWA functionality (service-worker) can help or there no way to do that? 回答1: This document contains a sample program that prints easily using the socket interface in C language. UB-E04 Technical Reference Guide It seems that the equivalent can be implemented using JavaScript WebSocket. This article is available in both Japanese and English, and both provide examples of using WebSocket easily from vanilla JavaScript. 5分で動かせるwebsocketのサンプル3つ / WebSocket Tutorials Introducing WebSockets:

How to improve speed with Receipt printer and ESC/POS commands in Java

倾然丶 夕夏残阳落幕 提交于 2020-01-02 06:19:32
问题 I have an application that communicates with a thermal printer in Java and makes the thermal printer print receipts with a barcode/emphasis/different sizes and so forth using a Star tsp 100 Printer. I can make the program print exaclty what i like but the printer is very slow. I believe the reason is that I am using non-preferable way/method of sending the byte commands. public static void Command(byte[] bytes) throws Exception{ //The bytes array is the argument, consisting of a byte[] array

How use thermal printer(USB/Ethernet) on android, without using vendor SDK,?

人盡茶涼 提交于 2020-01-01 10:30:21
问题 I already implemented EPSON SDK(for Bluetooth) and working fine, but not Working on other printers, is there is any general way to accomplish it. what is ESC command, How it works?, 回答1: Please find this one.It will help your problem. ESC/POS Command Reference provides detailed information on ESC/POS commands, such as standard command syntax and protocol. It targets programmers who want to control the printer with ESC/POS commands. ESC/POS Command Reference is provided as replacement of ESC

How use thermal printer(USB/Ethernet) on android, without using vendor SDK,?

邮差的信 提交于 2020-01-01 10:30:10
问题 I already implemented EPSON SDK(for Bluetooth) and working fine, but not Working on other printers, is there is any general way to accomplish it. what is ESC command, How it works?, 回答1: Please find this one.It will help your problem. ESC/POS Command Reference provides detailed information on ESC/POS commands, such as standard command syntax and protocol. It targets programmers who want to control the printer with ESC/POS commands. ESC/POS Command Reference is provided as replacement of ESC

PHP printing to local Thermal Printer, does not work without networkname

孤人 提交于 2020-01-01 05:45:08
问题 I've build a POS (Point of Sale) application in PHP that can print directly to a thermal printer. In most cases i run the application on a local webserver using WAMP. Part of the printing code is: $printer = "\\\\localhost\\TM-T88V"; // Open connection to the thermal printer $fp = fopen($printer, "w"); if (!$fp){ die('no connection'); } $data = " PRINT THIS "; // Cut Paper $data .= "\x00\x1Bi\x00"; if (!fwrite($fp,$data)){ die('writing failed'); } This code works fine as long as the PC is

Epson epos sdk receipt alignment issue

被刻印的时光 ゝ 提交于 2020-01-01 00:49:48
问题 i'm currently using epson ePOS SDK for android. i need to print the receipt that menu name align to the left and its price align to the right in the same line but it doesn't work properly, my temporary solution is add some feed line to make its price align right, is it possible to have both text align left and right in the same line ? (Attachments below and please ignore question mark symbols) mPrinter.addTextAlign(Printer.ALIGN_LEFT); mPrinter.addFeedLine(0); textData.append(menuName);

PHP Thermal Printing Client-Side

邮差的信 提交于 2019-12-24 08:58:21
问题 I've got a Epson Thermal printer, model TM-T20 which I'm setting up for clients. Our webserver is a linux server, and the client machines will be Windows machines. Is it possible with php, to directly control the thermal printer attached to the clients computer? I have looked at javascripts window.print(), but that is not what I want, if possible I want to bypass the print dialog. Thanks, Tony 回答1: No. PHP has absolutely nothing to do at all with the client's printer. If the printer was

Print gif using java on a 4x6" paper

你说的曾经没有我的故事 提交于 2019-12-23 21:26:49
问题 What is the best way in Java to print a gif given as byte[] or ByteArrayInputStream on a paper with a size of 4x6 inches? This: PrintRequestAttributeSet aset = new HashPrintRequestAttributeSet(); aset.add(new MediaSize(4, 6, Size2DSyntax.INCH)); aset.add(new Copies(1)); PrintService[] pservices = PrintServiceLookup.lookupPrintServices(DocFlavor.INPUT_STREAM.GIF, aset); DocPrintJob printJob = pservices[0].createPrintJob(); Doc doc = new SimpleDoc(sap.getGraphicImageBytes(), DocFlavor.INPUT