grandchef / escpos-buffer

Library to generate buffer for thermal printers.
MIT License
51 stars 17 forks source link

Fix image paper feed #47

Open ma-zal opened 1 year ago

ma-zal commented 1 year ago

Fixes issue grandchef/escpos-buffer#46.

ma-zal commented 1 year ago

Important note: This change breaks 5 tests. So please double check if all of these model outputs should be changed, or if previous implementation for some of them was correct.

Changes output of:

It this is correct, I will update all these files for all tests passing (by additional commit). Should be done before PR approval. In other cases, further discussion is needed. :-)

mazinsw commented 1 year ago

Thanks for this pull request fix, i will test on printer this new binaries, but its problably that this image printing will get spacing between two lines for model MP-4200 TH, i will put the results here

ma-zal commented 1 year ago

Thanks for the answer @mazinsw. I am interested in testing your model. I found the specifications of your MP-4200 TH.

There is the interesting message on page 34:

A full print line with ‘N’ columns will need N*3 bytes. If the image to print has less than ‘N’ graphic columns, a LF command must be sent to perform line printing. Text and graphic may be mixed in the same line.

So for a smaller image, it looks like the 0x0A is correct. But for sure we can also test if a behavior is the same on images with the exact maximum width.

ma-zal commented 11 months ago

Dear @samueldurantes. I just rebased my PR to help to merge. Please merge this PR ... or else close without merging if not wanted. Thanks.