2
我想打印收據圖像。我在某種程度上取得了成功。我使用Epson的ePOS SDK進行打印。以下是代碼打印圖像使用ePOS SDK打印圖像
//create builder
EposBuilder *builder = [[[EposBuilder alloc] initWithPrinterModel:printername_ Lang:language_] autorelease];
if(builder == nil){
return;
}
//add command
int result = [builder addImage:selectImage_ X:0 Y:0 Width:MIN(IMAGE_WIDTH_MAX, selectImage_.size.width) Height:selectImage_.size.height Color:EPOS_OC_COLOR_1 Mode:[self getBuilderMode] Halftone:[self getBuilderHalftone] Brightness:[self getBuilderBrightness]];
result = [builder addCut:EPOS_OC_CUT_NO_FEED];
if(result != EPOS_OC_SUCCESS){
[ShowMsg showExceptionEpos:result method:@"addImage"];
return;
}
else{
[ShowMsg showExceptionEpos:result method:@"statusmsg_status"];
}
//send builder data
unsigned long status = 0;
unsigned long battery = 0;
result = [printer_ sendData:builder Timeout:SEND_TIMEOUT Status:&status Battery:&battery];
[builder clearCommandBuffer];
我能打印,圖像的
- 對準不正確
老兄面臨同樣的問題...請幫助別人 – iAnurag 2014-12-19 07:29:56
Plz檢查ePOS sdk論壇是否存在。您可以向他們詢問任何已知問題。 – 2014-12-19 07:33:21
任何人都知道如何使用epson打印長圖像數據?實際上,我傳遞給打印機的圖像包含很長的數據。它在UIImage中看起來很完美,但我正在打印它。它從底部切割並在最後一行覆蓋數據。任何人都知道如何解決這個問題? – 2014-12-22 06:39:58