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?

Submitted by on May 14, 2020 Permalink

Hi dear zebra experts,
I can print text in my invoice format and graphics like logo. But graphics are already in memory, i have copied it before via our android app.
Our android app can download graphics into printer memory and can print successfully. But i am facing issue with ios application and objective c.
We use printer in zpl mode and storeImage function to download images(.png format) into printer. My code is below:
[[printer getGraphicsUtil] storeImage:@"E:SIGNATURE.PNG" withImage:[image CGImage] withWidth:image.size.width andWithHeight:image.size.height error:error];
And i will print it like below if i can download it:
[strFooter appendFormat:@"^FO150,%d,^IME:SIGNATURE.PNG^FS", lastLine];
Please supply me why i can't download image into printer memory.
Thank you so much.

Submitted by Anonymous (not verified) on May 04, 2019 Permalink

Hi Jeffrey,

Thank you for sharing your code. Let me take a look at your code and some documentation here and I will get back to you with next steps.

Thank you,