AndBondStyle/niimprint

Clean space when i print the image with 50X30mm tag

Opened this issue · 5 comments

I'm testing the code and after set to print one tag my tag is clean in the last spacke nex to border from tag, in this case i'm testing this imagem.

image

The space that contains the red rectangle not printing.

My printer is B1 and i use this command to execute python niimprint -m b1 -c usb -a COM19 -d 3 -i .\RenovatioMed-Adesivo.png

Looks like another instance of #3

@TeschRenan That is due to the timer in https://github.com/AndBondStyle/niimprint/blob/main/niimprint/printer.py#L114

The correct way is to poll the printer until it's done printing and send the end_print command to complete it, instead of relying on a timer. I've done that on my fork ( TheZoc/niimprint )

In case you don't want to use a fork and don't want to make complicated changes in here, you can just increase that timer from 0.3 to 1.0 (or so) and it will print everything (though a bit slower)

Excellent, I'll test this feature today.

Thank you @TheZoc.

Had this same issue, also a B1. Tried changing it to 1.0, but still not printing bottom quarter of file.

@rubeycubey The timer must be above self.end_page_print()

You could also use the fork that has that fixed already (but it requires python 3.12 for now, until I update it)