Я пытаюсь распечатать изображения с устройств iOS с помощью Zebra QLn220 и link_os_sdk. Изображение имеет размер 719x1248 точек, но половина изображения всегда отключается при печати. Я установил размер ярлыка принтера на 1.8in на 4in с помощью Zebra Setup Utilities, который, как представляется, распечатает 3 дюйма пустой метки и небольшую часть изображения. Я также попытался масштабировать изображение до половины его первоначального размера без везения. Что я могу сделать, чтобы отобразить все изображение на ярлыке?Принтер Zebra Печать обрезанных изображений
-(void)printImageButtonTapped : (DiscoveredPrinter *)discoveredPrinter {
NSString* filePath = [[NSBundle mainBundle] pathForResource:@"jpegsample"
ofType:@"jpeg"];
self.connection = [[TcpPrinterConnection alloc] initWithAddress:discoveredPrinter.address andWithPort:6101];
NSError *error = nil;
[self.connection open];
self.printer = [ZebraPrinterFactory getInstance:self.connection error:&error];
if(error != nil) {
NSLog(@"Error: %@",error);
}
error = nil;
if (self.printer != nil) {
TcpPrinterConnection *zebraPrinterConnection = [[TcpPrinterConnection alloc] initWithAddress:discoveredPrinter.address andWithPort:6101];
BOOL success = [zebraPrinterConnection open];
success = success && [[self.printer getGraphicsUtil] printImageFromFile:filePath atX:0 atY:0 withWidth:-1 withHeight:-1 andIsInsideFormat:NO error:&error];
[zebraPrinterConnection close];
if (error != nil || self.printer == nil || success == NO) {
NSLog(@"error: %@ printer: %@ success: %hhd",error,self.printer,success);
}
}
}