Zebra iMZ320 图像打印进纸过多 [英] Zebra iMZ320 image printing feeds too much paper

查看:35
本文介绍了Zebra iMZ320 图像打印进纸过多的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用 Link-OS SDK 使用适用于 iOS 的 XCode 中的 GraphicsUtil 类将图像发送到 Zebra iMZ320 打印机.

I'm trying to use the Link-OS SDK to send images to a Zebra iMZ320 printer using the GraphicsUtil class in XCode for iOS.

-(void)printImage:(UIImage *)image{

    NSString *serialNumber = @"";
    EAAccessoryManager *sam = [EAAccessoryManager sharedAccessoryManager];
    NSArray * connectedAccessories = [sam connectedAccessories];
    for (EAAccessory *accessory in connectedAccessories) {
        if([accessory.protocolStrings indexOfObject:@"com.zebra.rawport"] != NSNotFound){
            serialNumber = accessory.serialNumber;
            break;
        }
    }
    self.connection = [[MfiBtPrinterConnection alloc] initWithSerialNumber:serialNumber];
    NSError *error = nil;

    BOOL success = [self.connection open];

    self.printer = [ZebraPrinterFactory getInstance:self.connection error:&error];

    //Set the device language to zpl or the image prints its HEX value
    [SGD SET:@"device.languages" withValue:@"zpl" andWithPrinterConnection:self.connection error:&error];

    id<GraphicsUtil, NSObject> graphicsUtil = [self.printer getGraphicsUtil];

    success = [graphicsUtil printImage:[image CGImage] atX:0 atY:0 withWidth:200 withHeight:200 andIsInsideFormat:NO error:&error];


}

图像打印正确,但打印机在打印图像之前送入了大约 9 英寸的空白纸.我试过了将media.tof"变量设置为 0 并尝试发送 SETFF 50 2 命令,但没有成功.任何提示?谢谢!

The image prints correctly but the printer feeds about 9 inches of blank paper before printing the image. I tried to set the "media.tof" var to 0 and tried to send the SETFF 50 2 command, with no luck. Any hints ? Thanks!

推荐答案

这通常是 Zebra 打印机配置问题.Zebra 打印机可以设置为连续模式(用于打印收据)或标签模式(用于打印标签).此外,当设置为标签模式时,打印机可能会寻找黑条来分隔标签或标签之间的间隙.所以,最重要的问题是:您使用的是什么类型的媒体?

This is generally a Zebra printer configuration issue. Zebra printers can be set to either continuous mode (for printing receipts) or label mode (for printing labels). Furthermore, when set to label mode, the printer could be looking for a black bar to separate labels OR a gap in between the labels. So, the most important question is: what type of media are you using?

连续的收据"纸 -

如果您使用连续纸,您需要提前设置打印作业的标签长度​​.您还需要表明您正在使用连续媒体.您可以发送这些命令来执行此操作:

If you are using continuous paper, you will want to set the label length of your print job ahead of time. You will also want to indicate that you are using continuous media. You can send these commands to do so:

! U1 setvar "ezpl.media_type" "continuous"
! U1 setvar "zpl.label_length" "500"

中间有黑条的标签 -

如果您使用的是黑条标签,则需要将此 SGD 命令发送到打印机:

If you are using black bar labels, you need to send this SGD commands to the printer:

! U1 setvar "ezpl.media_type" "mark"

标签之间有间隙 -

如果您使用的标签之间有间隙,则需要发送以下 SGD 命令:

If you are using labels with gaps in between, the following SGD command needs to be sent:

! U1 setvar "ezpl.media_type" "gap/notch"

(注意上面的命令是用 !U1 SGD 表示法.你可以简单地使用你在代码中看到的 SDK 'SGD' 调用来实现相同的效果)

(Notice the commands above are in ! U1 SGD notation. You can simply use the SDK 'SGD' calls as you see in your code to accomplish the same effect)

这篇关于Zebra iMZ320 图像打印进纸过多的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆