I'm using ePOS SDK from Epson which allows connecting to the printer (TM-T88V) via wifi. link for the sdk (http://pos.epson.com/mobilesdks/index.htm)
I'm loading an UIImage from a url using this code.
NSData* data = [[NSData alloc] initWithContentsOfUrl:_url];
UIImage* image = [UIImage imageWithData:data];
Then to Print the image (using ePOS) NOTE: I will skip the connecting part since it is not included to my question.
EposBuilder* builder = [EposBuilder alloc] initWithPrinterModel:@"TM-T88V" lang:EPOS_OC_MODEL_ANK];
EposPrint* printer = [[EposPrint alloc] init];
int retVal = EPOS_OC_SUCCESS;
unsigned long status = 0;
retVal = [builder addImage:image X:0 Y:0 Width:image.size.width Height:image.size.Height Color: EPOS_OC_COLOR_1];
retVal = [printer sendData:builder Timeout:10000 Status:&status];
Now my problem is that the printed result is alot smaller, see the size of the image is 271x368px. see image below for sample
Any ideas on how to make it print properly? Also i've found this Printing UIImage using AirPrint causes cut-off content which gave a link on scaling the image but it doesn't work. Any ideas? Thank you.