Image printing

J Jeffrey 2amdbpw9sauic1bf5yqbsftsex7zt2z0,Lee 2 years 11 months ago
51 2 0

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?

Please register or login to post a reply

2 Replies

c cvccve tytuwda

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.

V Vedsatx Saddvv

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,
Beverly

CONTACT
Can’t find what you’re looking for?