niimprint icon indicating copy to clipboard operation
niimprint copied to clipboard

Clean space when i print the image with 50X30mm tag

Open TeschRenan opened this issue 2 years ago • 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

TeschRenan avatar Apr 11 '24 23:04 TeschRenan

Looks like another instance of #3

MoshiBin avatar Apr 12 '24 20:04 MoshiBin

@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)

TheZoc avatar Apr 25 '24 21:04 TheZoc

Excellent, I'll test this feature today.

Thank you @TheZoc.

TeschRenan avatar May 08 '24 12:05 TeschRenan

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

rubeycubey avatar May 11 '24 12:05 rubeycubey

@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)

TheZoc avatar May 11 '24 22:05 TheZoc