starprnt icon indicating copy to clipboard operation
starprnt copied to clipboard

cutReceipt ignored by iOS - Ionic 3 - TSP100ECO

Open NicolaasZA opened this issue 5 years ago • 1 comments

Greetings,

When trying to print receipts using printRasterReceipt, I found that iOS ignores cutReceipt: false, cutting each time.

Looking into StarPRINT.m, I found this line in several functions making use of the RasterObj and the cutReceipt field: BOOL cutReceipt = ([printObj valueForKey:@"cutReceipt"]) ? YES : NO;

To fix the issue, I modified them: BOOL cutReceipt = ([[printObj objectForKey:@"cutReceipt"]boolValue]) ? YES : NO;

This changes the way the data sent to the native side is cast and compared.

Does anyone else have this issue?

NicolaasZA avatar Dec 10 '19 11:12 NicolaasZA

Hi @NicolaasZA,

I had the same issue. Your fix works for me. Thnx! I've created a pull request to implement your solution in the next release. Hopefully the owner of this repo is still moderating.

Regards, Peter

petermeester avatar Jan 02 '22 22:01 petermeester