Zebra

Java调用Zebra条码打印机打印条码、中英文数字条码混合标签,可自由控制格式和排版

匆匆过客 提交于 2019-12-07 18:36:18
最近研究了一下Zebra条码打印机,粗略了解了一下ZPL语言,Down了几个Demo,但始终觉得这些Demo不规范、不完整,问题多多,于是自己整理了一下。代码注释我写得很清楚,无需太多解释,一看便知。如果要对元素格式进行修改,需要对zpl语言有所了解。 功能要点: 1.Java调用打印机 2.打印单个条码 3.打印中文字符 4.打印中文、英文、数字、条码混合标签 打印效果: import java.io.File; import java.io.FileInputStream; import java.io.IOException; import java.io.UnsupportedEncodingException; import javax.print.Doc; import javax.print.DocFlavor; import javax.print.DocPrintJob; import javax.print.PrintException; import javax.print.PrintService; import javax.print.PrintServiceLookup; import javax.print.SimpleDoc; import javax.print.attribute.standard.PrinterName; public

java实现ZEBRA斑马打印机 FNTHEX32.dll 打印图片和文字

白昼怎懂夜的黑 提交于 2019-12-07 18:29:16
斑马打印中文的原理是使用FNTHEX32将中文转换成图片,再转换成斑马能识别的字符串代码 但是java调用DLL是无法跨平台的,所以按照斑马的图片编码原理我写了一个java版的图片编码类,供掉坑的各苦逼程序猿参考 public class Fnthex { public static BufferedImage source = new BufferedImage(10, 10, BufferedImage.TYPE_INT_ARGB); public static Graphics2D gs = source.createGraphics(); // public static String getFontZpl(String content, int x, int y, int size, String fontName) { // return String.format("^FO%d,%d^A1N,%d,%d^FD%s^FS", x, y, size, size, content); // } public static String getFontHexWithWidth(String content, int x, int y, int width, int maxHeight, String fontName) { if (content == null || ""

查看端口占用

天大地大妈咪最大 提交于 2019-12-06 04:17:13
目录 查看端口占用 /etc/services title: 查看端口占用 date: 2019/11/30 10:02:23 toc: true --- 查看端口占用 /etc/services vmuser@ubuntu:~$ cat /etc/services # Network services, Internet style # # Note that it is presently the policy of IANA to assign a single well-known # port number for both TCP and UDP; hence, officially ports have two entries # even if the protocol doesn't support UDP operations. # # Updated from http://www.iana.org/assignments/port-numbers and other # sources like http://www.freebsd.org/cgi/cvsweb.cgi/src/etc/services . # New ports will be added on request if they have been officially assigned #

Mysql data to a styled HTML Table

匿名 (未验证) 提交于 2019-12-03 09:02:45
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I need some Help. I'm new to PHP and the last couple of days trying to solve this issue. I am trying to parse data from my database to a styled HTML Table and I am not able to find any tutorials on this. I did do the tutorial for parsing to a table that is created with PHP. I would like to use the tables I did include in this file. If anyone would be so kind to show me how to do this and also explain it I would be very happy. This is the PHP file I did try to work with. Only one close I could find from tutorials. This is the stylesheet I

How to add row borders and zebra stripes (row striping) to datatables DT in R?

匿名 (未验证) 提交于 2019-12-03 03:10:03
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I would like to know the proper way to add row borders styling and zebra stripes option to datatables created with the package DT in R. Simple starter example: library(DT) datatable(iris) Simple example with options: datatable(head(iris, 20), options = list( columnDefs = list(list(className = 'dt-center', targets = 4)), pageLength = 5, lengthMenu = c(5, 10, 15, 20) )) Not sure why I received a down vote? Please let me know if anything is unclear or how to improve this question. 回答1: You can add the stripe and row-border class to the table

Shorter syntax for casting from a List<X> to a List<Y>?

匿名 (未验证) 提交于 2019-12-03 01:58:03
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I know its possible to cast a list of items from one type to another (given that your object has a public static explicit operator method to do the casting) one at a time as follows: List ListOfY = new List (); foreach(X x in ListOfX) ListOfY.Add((Y)x); But is it not possible to cast the entire list at one time? For example, ListOfY = (List )ListOfX; 回答1: If X can really be cast to Y you should be able to use List listOfY = listOfX.Cast ().ToList(); Some things to be aware of (H/T to commenters!) You must include using System.Linq; to get

ZXing(Zebra Xing) Unable to scan/ detect the barcode in Xamarin iOS

匿名 (未验证) 提交于 2019-12-03 01:36:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: I posted couple other questions in regards to Zxing please DONT mark it duplicate just because they are about Zxing.. So, in my Xamarin iOS app, I am using Zxing to detect the barcode. I am using https://github.com/Redth/ZXing.Net.Mobile/tree/master/Samples/iOS as example. I am using a subview to scan for barcodes. The custom overlay n everything works fine but it is unable to detect the barcode when I'm trying to scan. Can anyone please help me out where I'm doing wrong or missing something. CODE public UIView camView ;

Printing arabic text using Zebra printer [ZPL]

匿名 (未验证) 提交于 2019-12-03 01:23:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: As the title says Is there any option to print the arabic content ZPL Printer. Thing tried is adding the font and initiate the print My printer has TT0003M_.TTF font installed but it shows "????" when i tried to print arabic using Any idea how to install a font and print the arabic text using ZPL language? 回答1: ^XA^CI28^CW1,E:TT0003M_.TTF^LL130^FS ^PA0,1,1,1 ^XZ Updated this answer to match the other question Also found this on the Zebra KB - https://km.zebra.com/kb/index?page=content&id=SO6820&actp=RSS 转载请标明出处: Printing arabic

Sending commands directly to Zebra EPL

匿名 (未验证) 提交于 2019-12-03 01:08:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I am trying to send commands directly to a Zebra TLP2844 printer. I followed the suggestion made here and my final code came to be as follows: var cm: String; p: TPrinter; i: integer; begin p := Printer; p.BeginDoc; for i := 0 to memo1.Lines.Count-2 do begin cm := memo1.Lines[i]; if Escape(p.Canvas.Handle, PASSTHROUGH, Length(cm), PAnsiChar(cm), nil) = 0 then ShowMessage('Command error: ' + IntToStr(GetLastError)); end; p.EndDoc; end; The content of memo1 is (first line is empty) as purposed here : N q609 Q203,26 B26,26,0,UA0,2,2,152,B,

Developing an utility for rendering ZPL code of Zebra printer (105 SL) [duplicate]

匿名 (未验证) 提交于 2019-12-03 00:57:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: Possible Duplicate: Print preview ZPL II commands using .NET WinForm before sending it to Zebra printer I start developing an utility on .NET 4.0 for Zebra Printer 105SL. Maybe someone know these devices. I have some questions: I've just started learning ZPL code. Does it exist some utility for rendering Zebra printer code (ZPL)? For example input is ZPL code and output is some label image. Does it exist a library for rendering ZPL code? Input is ZPL code output is some image. Now I can print on Zebra printer only if Zebra printer is