日期:2023-01-14 14:55:52
来源:互联网
点击:12
以下就是为您整理的epson 二维码打印源代码的答案
请问epson pos打印机,命令集(二维条码)有什么好的建议?// Store the data in symbol storage area
byte[] storeQRCode = new byte[] { 0x1D, 0x28, 0x6B, 0xB7, 0x00, 0x31, 0x50, 0x30 };
_serialPort.Write(storeQRCode, 0, storeQRCode.Length);
String contentBarcode = 123456789012345678901234567890
abcedfghijklmnopqrstuvwxyzabcd
123456789012345678901234567890
abcedfghijklmnopqrstuvwxyzabcd
123456789012345678901234567890
abcedfghijklmnopqrstuvwxyzabcd; //data = 180
_serialPort.Write(contentBarcode);
// Print out data of QR Code
byte[] printQRCode = new byte[] { 0x1D, 0x28, 0x6B, 0x03, 0x00, 0x31, 0x51, 0x30 };
_serialPort.Write(printQRCode, 0, printQRCode.Length);
TAB键在二维码源代码中有什么好的建议?我用VB写过一个二维码生成器,里面用VB的tab符就在二维码中实现了
TAB键在二维码源代码中怎么表示?急需求解!。。。这个不是二维代码所能显示的,二维代码显示的只是TAB这三个字母。而不是运行这个健。具体你要运行这个键得有程序的配合才行,没这么简单
epson 彩色激光打印机出现JAM MP E代码是什么?有什么好的建议?一般JAM是卡纸的意思,MP是手动进纸托盘的意思,E是故障的意思。
打印机使用维修最专业的地方是普广论坛,你自己搜一下,注册个会员,到那里去学吧!
求用java代码控制斑马条码打印机打印二维码商标的例子程序有偿求助!可以参考下.自己写的一个例子
import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.Image;
import java.awt.print.PageFormat;
import java.awt.print.Paper;
import java.awt.print.Printable;
import java.awt.print.PrinterException;
import java.awt.print.PrinterJob;
import java.util.Queue;
import com.google.zxing.WriterException;
public class QrPrint implements Printable {
public void print() throws PrinterException {
PrinterJob pj = PrinterJob.getPrinterJob();
PageFormat pf = pj.defaultPage();
Paper paper = new Paper();
double margin = 0.1; // half inch
paper.setImageableArea(margin, margin, paper.getWidth() - margin * 2,paper.getHeight() - margin * 2);
pf.setPaper(paper);
pj.setPrintable(this, pf);
pj.print();
}
public int print(Graphics graphics, PageFormat pageFormat, int pageIndex) throws PrinterException {
if (判断如果打印完了就退出) {
return Printable.NO_SUCH_PAGE;
}
try {
Image eanImage = generateEANBufferedImage(content,120,20);
Graphics2D g2 = (Graphics2D) graphics;
g2.translate(pageFormat.getImageableX(), pageFormat.getImageableY()); //设置可成像的X和Y轴的距离
g2.drawImage(eanImage, 0, 80, null); //设置打印的边距
g2.drawString(字符串:,130,20);
} catch (WriterException e) {
e.printStackTrace();
return Printable.NO_SUCH_PAGE;
}
return Printable.PAGE_EXISTS;
}
private BufferedImage generateBufferedImage(String content,int width,int height) throws WriterException {
HashtableEncodeHintType,String hints = new HashtableEncodeHintType,String();
hints.put(EncodeHintType.CHARACTER_SET, utf-8);
BitMatrix bitMatrix = new MultiFormatWriter().encode(content, BarcodeFormat.EAN_13, width, height, hints);
return MatrixToImageWriter.toBufferedImage(bitMatrix);
}
}
内容epson 二维码打印源代码来源于网友整理,仅供参考。提示:想了解更多epson 二维码打印源代码(打印二维码怎么调尺寸)相关的内容,请尝试通过上方搜索框搜索。