I use Epson's ePOS SDK, which allows you to connect to the printer (TM-T88V) via Wi-Fi. sdk link ( http://pos.epson.com/mobilesdks/index.htm )
I am loading 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 as it is not included in 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 much smaller, see image size 271x368px. see image below for sample
Any ideas on how to print it correctly? I also found that Printing UIImage using AirPrint causes disabled content that gave a link to image scaling, but it does not work. Any ideas? Thanks.
![enter image description here](https://fooobar.com//img/a3f6a28cdbb103a17063bdc9b9d1e2e2.jpg)
source share