thermal-printer

How to Calculate Zebra Font 0 text width?

我的梦境 提交于 2019-12-22 09:37:27
问题 Is there a way to calculate the total width of Zebra Font 0 given text? Consider the following ZPL command, **^XA^FO100,150^A030,30^FDSample Text^FS^XZ** Here both character height and width is 30 dots. I want to calculate the actual width of this text in mm. Please note that printer DPI is 300.............. 回答1: Font 0 is a variable-width font (not monospaced like some of the others), so the width of the text will depend on the text itself. One option would be to switch to a built-in

How to convert monochrome image to bitwise format for thermal printer

余生颓废 提交于 2019-12-21 19:52:50
问题 I'm using a Custom s'print DPT100-S thermal printer to made a receipt printing application. It is able to print graphics using 384 pixels in one line. This data has to be passed on to the printer using 48 bytes (48x8=384). So, each 'bit' represents one dot to be printed (bit will be '0' for white and '1' for black). So, I need to create a program which will read a monochrome BMP generated in Windows Paint(or any other program) and convert it into this bit format using a C program in Linux.

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

北战南征 提交于 2019-12-20 05:59:15
问题 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

Is there any way to write stylesheet specific to thermal printer?

一曲冷凌霜 提交于 2019-12-13 19:33:08
问题 I am using ASP.Net MVC. I have a view,which I need to print. If its Laser printer then using media queries, I can configure a print friendly version of my view. But how do I do the same for thermal printer. Is there any option, where we can write stylesheet specific to thermal printer? Or any other way to do the same? 来源: https://stackoverflow.com/questions/34774473/is-there-any-way-to-write-stylesheet-specific-to-thermal-printer

Print labels via a redirected printer

╄→尐↘猪︶ㄣ 提交于 2019-12-12 04:48:44
问题 My task is to print labels via a thermal printer. To this purpose a string of tspl(programming language that the printer understands) commands is generated and sent to the printer. The latter is done in C# with the following method taken from the microsoft example "How to send raw data to a printer by using Visual C# .NET" public static bool SendBytesToPrinter(string szPrinterName, IntPtr pBytes, Int32 dwCount) { Int32 dwError = 0, dwWritten = 0; IntPtr hPrinter = new IntPtr(0); DOCINFOA di =

How can I create and start an Intent?

筅森魡賤 提交于 2019-12-12 02:56:43
问题 I was wondering how I can create and start an intent using this: "qsrtech.posprintdriver/.printservice" I downloaded the POS Printer Driver (ESC) app (which is the app I am trying to access). I tried this: String PrintPage = "qsrtech.posprintdriver/.printservice"; Intent intent = new Intent(Intent.ACTION_MAIN); intent.setComponent(ComponentName.unflattenFromString(PrintPage)); intent.addCategory(Intent.CATEGORY_LAUNCHER ); startActivity(intent); However, I get an error saying: "No activity

Connecting My Android app with wifi printer for printing bills

馋奶兔 提交于 2019-12-12 01:59:14
问题 I am trying to print a set of values through a wifi printer without internet.How to detect the list of wifi printers and connect to them.The tough part is how to start printing when the data is sent from mobile android app.Sample code will be very helpful. Note : we are not supposed to use any secondary applications and also it should not depend on printers from specific manufacturer.It should detect all the printers available through wifi and print through the selected printer. 来源: https:/

Using two identical POS printers via JavaPOS

假装没事ソ 提交于 2019-12-12 01:58:13
问题 We are writing one app using JavaPOS that requires printing to two identical POS printers (Bixolon SRP-330) via JavaPOS (one using regular paper, other for stickers) What would be the best approach to handle such use case? We tried creating double entry in jpos.xml, directly specifying portname in jpos properties but still no luck, we are only able to use one of those printers at the same time using JavaPOS and logical device name. (At lower level echo "test > /dev/usb/lp0 and echo "test >

Send escape character to printer

橙三吉。 提交于 2019-12-10 09:54:36
问题 I am developing an C# application to print labels from a thermal transfer printer from SATO (CG408 TT) For this I am using SBPL (Programming language for SATO). Which looks something like following: <ESC>A <ESC>H0050<ESC>V0100<ESC>L0303<ESC>XMSATO <ESC>H0050<ESC>V0200<ESC>B103100*SATO* <ESC>H0070<ESC>V0310<ESC>L0101<ESC>XUSATO <ESC>Q1<ESC>Z To communicate with Printer and send raw data to it I am following this technique. At first i am trying to build the escape sequences using StringBuilder

C# code for open/close drawer and printing the receipt at the same time? [closed]

六月ゝ 毕业季﹏ 提交于 2019-12-08 14:20:18
问题 It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. Closed 8 years ago . Does any body know how to create a C# application that can open a drawer connected to the computer and print receipt at same time? Drawer Name: PCD-354 Electronic Cash Drawer Cash receipt printer: Epson TM-T88v