Image printing

To print images on the ZQ510, I use the following:

 

Store images

 

// Store the BSS image on the printer image = [UIImage imageNamed:@"bss-train-logo-v2.png"]; [graphicsUtil storeImage:@"BSS_V2" withImage:[image CGImage] withWidth:image.size.width andWithHeight:image.size.height error:&error];  // Store the Cemetery image on the printer image = [UIImage imageNamed:@"cemetery-tour-logo-v3.png"]; [graphicsUtil storeImage:@"CEMETERY_V3" withImage:[image CGImage] withWidth:image.size.width andWithHeight:image.size.height error:&error]; NSLog(@"Cemetery Image Error: %@", error);

 

Recall Images

 

printString = [NSString stringWithFormat:@"%@^FO50,%ld^XGE:%@.GRF,1,1^FS", printString, length, @"BSS_V2"]; length += 75;  printString = [NSString stringWithFormat:@"%@^FO50,%ld^XGE:%@.GRF,1,1^FS", printString, length, @"CEMETERY_V3"]; length += 160; 

 

Sometimes, the images print perfectly. Other times (about 25-50%), one or both of the images does not print. The rest of the receipt is printed as expected. Any ideas?