thermal-printer

How to send data to bluetooth printer vai android app?

纵然是瞬间 提交于 2019-12-02 17:18:40
I am developing an app which will send data to a printer via bluetooth to print (A thermal printer for receipts). I have followed the code which in this link. http://pastie.org/6203514 and this link also http://pastie.org/6203516 I am able to see the device and its MAC Address and its name, when I send the data to the printer (the light LED on the printer stops blink and becomes standard i.e the printer is connected with my android phone) but when I send the data it is not printing and nor it is giving any error also. I have googled a lot and I found many codes and tried all set of codes but

ESC/POS image in java

南楼画角 提交于 2019-12-02 13:43:37
问题 I need to print this image in a thermal printer(SAM4S ELLIX40). I've been searching and testing several codes but nothing actually works, they said "use this command and you'll see a line", I send that and nothing happens. I tried this commands from manuals: ESC * m nL nH d1…dk GS * x y d1…dk The one that I most tried was ESC *, but I never understood how to set nL and nH. String text_to_print = "Hello world!"; DocPrintJob dpj = selected_printjob.createPrintJob(); InputStream stream = new

Plot an array into bitmap in C/C++ for thermal printer

混江龙づ霸主 提交于 2019-12-02 08:36:36
I am trying to accomplish something a bit backwards from everyone else. Given an array of sensor data, I wish to print a graph plot of it. My test bench uses a stepper motor to move the input shaft of a sensor, stop, get ADC value of sensor's voltage, repeat. My current version 0.9 bench does not have a graphical output. The proper end solution will. Currently, I have 35 data points, and I'm looking to get 90 to 100. The results are simply stored in an int array. The index is linear, so it's not a complicated plot, but I'm having problems conceptualizing the plot from bottom-left to top-right

Send files to WiFi printer

筅森魡賤 提交于 2019-11-30 15:24:04
I am developing an application in which from my mobile I am sending files to the WiFi printer by IP address and port number, which are .txt, .png, .jpg, .doc. They should be printed from the printer. I have tried following code but it is giving me output for .txt file only. What changes are required to get output of all type of files??? Please help... import java.io.BufferedInputStream; import java.io.File; import java.io.FileInputStream; import java.io.IOException; import java.io.OutputStream; import java.net.Socket; import java.net.UnknownHostException; import android.app.Activity; import

Printing directly to a thermal printer using ESC/POS Commands executed in C# with an interface of TCP/IP

和自甴很熟 提交于 2019-11-30 07:29:35
I was working on implementing ESC/POS(Epson Standard Code for Point of Sale) on a Kitchen printer(Aclas KP71M). I have a user interface the the POS user enters its string in to the user interface and the strings entered by the user will be sent to the printer and the printer prints the data. The printer interface with the host computer using Ethernet(100M) using TCP/IP connection. I have managed to embed each of the necessary commands in to a C# method and I also take some sample code on server/client C# connection and tried to include that in to my connection. The problem I am facing right

Converting a bitmap to monochrome

爷,独闯天下 提交于 2019-11-30 05:13:07
I am trying to save an image as monochrome (black&white, 1 bit-depth) but I'm coming up lost how to do it. I am starting with a png and converting to a bitmap for printing (it's a thermal printer and only supports black anyway - plus its slow as hell for large images if I try to send them as color/grayscale). My code so far is dead simple to convert it to a bitmap, but it is retaining the original colour depth. Image image = Image.FromFile("C:\\test.png"); byte[] bitmapFileData = null; int bitsPerPixel = 1; int bitmapDataLength; using (MemoryStream str = new MemoryStream()) { image.Save(str,

Send files to WiFi printer

﹥>﹥吖頭↗ 提交于 2019-11-29 22:20:36
问题 I am developing an application in which from my mobile I am sending files to the WiFi printer by IP address and port number, which are .txt, .png, .jpg, .doc. They should be printed from the printer. I have tried following code but it is giving me output for .txt file only. What changes are required to get output of all type of files??? Please help... import java.io.BufferedInputStream; import java.io.File; import java.io.FileInputStream; import java.io.IOException; import java.io

“PrinterException: Paper's imageable width is too small” I can see what's wrong, but how can I fix it?

◇◆丶佛笑我妖孽 提交于 2019-11-29 17:28:07
I'm getting this error when I try to print something for a specific label printer in my current college project: java.awt.print.PrinterException: Paper's imageable width is too small. at sun.print.RasterPrinterJob.printPage(Unknown Source) at sun.print.RasterPrinterJob.print(Unknown Source) at sun.print.RasterPrinterJob.print(Unknown Source) at Printer.print(Printer.java:91) at Printer.<init>(Printer.java:43) at VisitorDBTest.main(VisitorDBTest.java:10) But I cannot see the reason why. I have the exact label code for this particular printer, the label width and height are correct. I set the

Printing directly to a thermal printer using ESC/POS Commands executed in C# with an interface of TCP/IP

女生的网名这么多〃 提交于 2019-11-29 09:42:43
问题 I was working on implementing ESC/POS(Epson Standard Code for Point of Sale) on a Kitchen printer(Aclas KP71M). I have a user interface the the POS user enters its string in to the user interface and the strings entered by the user will be sent to the printer and the printer prints the data. The printer interface with the host computer using Ethernet(100M) using TCP/IP connection. I have managed to embed each of the necessary commands in to a C# method and I also take some sample code on

Print raw data to a thermal-printer using .NET

孤人 提交于 2019-11-28 18:29:47
I'm trying to print out raw ascii data to a thermal printer. I do this by using this code example: http://support.microsoft.com/kb/322091 but my printer prints always only one character and this not until I press the form feed button. If I print something with notepad the printer will do a form feed automatically but without printing any text. The printer is connected via usb over a lpt2usb adapter and Windows 7 uses the "Generic -> Generic / Text Only" driver. Anyone knows what is going wrong? How is it possible to print some words and do some form feeds? Are there some control characters I