我正在使用的Android项目斑马RW420和我编码,我发现,即使在简单的测试使用ZSDK开发打印机演示打印机打印大量的多余的纸张时,它发出打印命令。在这种情况下,我测试了签名捕获和打印演示。我发现,如果我把它连接到电脑,并打印使用斑马Designer创建一个标签,它打印标签正确,没有多余的纸张(其实我不介意几毫米的额外在该情况下)。
如果任何人知道如何节省一些树木在这里,将是巨大的!
在code的问题是:
connection.open();
ZebraPrinter打印机= ZebraPrinterFactory.getInstance(连接);
GraphicsUtil G = printer.getGraphicsUtil();
位图图像= signatureArea.getBitmap();
g.printImage(图像,0,0,image.getWidth(),image.getHeight(),假);
connection.close()时;
解决方案
你有关键字 FORM
在你的CPCL标签吗?它通常在打印前
本通知打印机打印到顶级的形式设置打印机配置为之后形成饲料。要禁用它,您可以从您的格式中删除 FORM
关键字,如果你不需要它,或者你可以设置顶级的形式
0。
! U1 getvarmedia.tof
会告诉你你的顶的形态,目前设置为
! U1 SETVARmedia.tof0
将其设置为0,从而使 FORM
将饲料0点
I am using a zebra RW420 in an android project and I am coding and I find that even when simply testing the printer using the ZSDK Developer Demos the printer is printing lots of extra paper when it is issued a print command. In this case I am testing out the signature capture and print demo. I do find that if I connect it to the computer and print a label created using Zebra Designer it prints the label properly with no extra paper (in fact i wouldn't mind a couple of millimeters extra in that case).
If any one knows how to save some trees here that would be great!
The code in question is:
connection.open();
ZebraPrinter printer = ZebraPrinterFactory.getInstance(connection);
GraphicsUtil g = printer.getGraphicsUtil();
Bitmap image = signatureArea.getBitmap();
g.printImage(image, 0, 0, image.getWidth(), image.getHeight(), false);
connection.close();
解决方案
Do you have the keyword "FORM
" in your CPCL label? It's usually before PRINT
This tells the printer to form feed after printing to the top-of-form setting the printer is configured to. To disable it, you can remove the FORM
keyword from your format if you don't need it, or you can set the top-of-form
to 0.
! U1 getvar "media.tof"
will show you what your top-of-form is currently set to
! U1 setvar "media.tof" "0"
will set it to 0, so that the FORM
will feed 0 dots