auctifera-josed / starprnt

Cordova plugin for the Star micronics printers
MIT License
40 stars 39 forks source link

cutReceipt ignored by iOS - Ionic 3 - TSP100ECO #42

Open NicolaasZA opened 4 years ago

NicolaasZA commented 4 years ago

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?

petermeester commented 2 years ago

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