ios - Epson TM-T88V-i 只能打印一次

标签 ios objective-c xcode epson

我的 Epson TM-T88V-i 打印机出现问题,第一次可以打印,但之后总是收到 EPOS2_ERR_CONNECT 错误。

我使用 SDK 中的示例它有这个问题。

这是代码:

int result = EPOS2_SUCCESS;

if (self.printer == nil) {
    return NO;
}

result = [self.printer connect:@"TCP:192.168.1.15" timeout:EPOS2_PARAM_DEFAULT];
if (result != EPOS2_SUCCESS) {
    return NO;
}

result = [self.printer beginTransaction];
if (result != EPOS2_SUCCESS) {
    [self.printer disconnect];
    return NO;
}

第一次之后,它进入带有 EPOS2_ERR_CONNECT 的 connect 方法之后的 if

我必须重新启动打印机才能重新打印某些内容。

最佳答案

几个月前我也遇到过同样的问题......

对于 TM-T88V-i 打印机,您必须使用另一种语法进行连接: 使用<connection type>:<identifier>[<device ID>]而不是<connection type>:<identifier>

所以你的代码是这样的:

result = [self.printer connect:@"TCP:192.168.1.15[local_printer]" timeout:EPOS2_PARAM_DEFAULT];

注意local_printer 是默认标识符。

关于ios - Epson TM-T88V-i 只能打印一次,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51390183/

相关文章:

ios - 如何将属性与在多个 RACObserve 中的任何一个中发现的更改绑定(bind)

ios - 如何在 Objective-C 中格式化 Instagram 日期

ios - 没有要搜索的对象但有条件的二进制搜索 NSArray

ios - 修改核心数据模型后重新创建类定义的更好方法?

ios - 无法从警报完成 : 弹出导航 Controller

ios - 自动拍照

ios - 在 ViewWillAppear 完成运行之前调用 CellForRowAtIndexPath

ios - 从 Swift 3.0 到 Swift 4.2 的转换错误 "Cannot assign value of type ' [String ]' to type ' [AVMetadataObject.ObjectType] ?'"

ios - Objective-C 运行时崩溃

ios - 在 iOS 7 中将我的 View Controller 滑回对于只有一个 View Controller 来说非常慢