Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/ios/116.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ios 等待时间爱普生T88V_Ios_Macos_Printing_Epson - Fatal编程技术网

Ios 等待时间爱普生T88V

Ios 等待时间爱普生T88V,ios,macos,printing,epson,Ios,Macos,Printing,Epson,问题: 如何毫不延迟地打印(多张)收据 据我所知,在OSX或iOS设备上使用T88V打印至少有3个选项。不幸的是,这三个选项都有一个缺陷 备选案文1: 我一直在使用官方OSX驱动程序(最新版本1.2a),打印时没有问题。但是,在每个打印命令之间有1秒的延迟 - (IBAction)button1:(id)sender { [self TMAppPrint]; } - (OSStatus)TMAppPrint { TMTextView *textWindow = [[TMT

问题: 如何毫不延迟地打印(多张)收据

据我所知,在OSX或iOS设备上使用T88V打印至少有3个选项。不幸的是,这三个选项都有一个缺陷

备选案文1: 我一直在使用官方OSX驱动程序(最新版本1.2a),打印时没有问题。但是,在每个打印命令之间有1秒的延迟

- (IBAction)button1:(id)sender
{
    [self TMAppPrint];
}

- (OSStatus)TMAppPrint
{   
    TMTextView *textWindow = [[TMTextView alloc] init];
    NSPrintInfo *printInfo = [NSPrintInfo sharedPrintInfo];

    OSStatus err = noErr;

    err = [TMPrintSupport TMSetJobTicket:printInfo printerName:@"TM-T88V" documentSize:NSMakeSize(204.0, 841.8) resolution:@"180x180dpi" speed:@"1" blank:@"Off" paperCut:@"DocFeedCut" chashDrwr1:@"Off" chashDrwr2:@"Off" buzzerControl:@"Off" buzzerPattern:@"Internal" buzzerRepeat:@"1"];

    NSPrintOperation *printOperation = [NSPrintOperation printOperationWithView:textWindow printInfo:printInfo];
    [printOperation setCanSpawnSeparateThread:YES];
    [printOperation setShowsPrintPanel:NO];
    [printOperation runOperation];

    return err;
}
备选案文2: 使用iOS SDK(最新版本1.3.0),我也可以毫无问题地打印,但更糟糕的是。发送打印命令后,在打印之前将有1秒的延迟

- (IBAction)button2:(id)sender
{
    if (printer != nil)
    {
        errorStatus = EPOS_OC_SUCCESS;
        if (builder != nil)
        {
            int printStatus = EPOS_OC_SUCCESS;

            // create a print document
            printStatus = [builder addTextLang: EPOS_OC_LANG_EN];
            printStatus = [builder addTextSmooth: EPOS_OC_TRUE];
            printStatus = [builder addTextFont: EPOS_OC_FONT_A];
            printStatus = [builder addTextSize: 1 Height: 1];
            printStatus = [builder addTextStyle: EPOS_OC_FALSE Ul: EPOS_OC_FALSE Em: EPOS_OC_TRUE Color: EPOS_OC_PARAM_UNSPECIFIED];

            // specify the print data>
            printStatus = [builder addText: @"hello!\n"];
            printStatus = [builder addCut: EPOS_OC_CUT_FEED];

            // send data>
            errorStatus = [printer sendData:builder Timeout:1000 Status: &status];

            // end communication with the printer>
            errorStatus = [printer closePrinter];
        }
    }
}
备选案文3: 最后一个选项是使用ESC/POS命令。我设法让它打印了一些基本的行,但我仍然不明白其中的大部分。不过,印刷工作没有延误

- (IBAction)button3:(id)sender
{   
    printer = [[EposPrint alloc] init];
    errorStatus = [printer openPrinter:EPOS_OC_DEVTYPE_TCP DeviceName:@"192.168.1.168"];
    builder = [[EposBuilder alloc] initWithPrinterModel:@"TM-T88V" Lang:EPOS_OC_MODEL_ANK];
}
我已经直接向爱普生询问了这件事,但他们没有给我任何答案,除非它按预期工作。。。这意味着我必须深入研究ESC/POS命令并学习它,或者还有其他选项吗