KevinGong2013 / Printer

Swift ticket printer framework for ESC/POS-compatible thermal printers.
Apache License 2.0
144 stars 72 forks source link

Wrong image on Ticket - horizontal white lines #55

Open TillMoss opened 2 years ago

TillMoss commented 2 years ago

When I print an image on ticket I get this result. How can I solve this? IMG_9357 (1)

smalldevcloud commented 2 years ago

With the image with smaller size you're gettin' the same result?

TillMoss commented 2 years ago

This result is on Epson TM-T20 III if I use another brand works correctly. The image on Epson is stretched. In fact if you look my uploaded image should be a square but the height is wrong

KevinGong2013 commented 1 year ago

Printer has been rewrite.

select Mode to double width& double height

let receipt = Receipt(.🖨️58(.ascii))
<<~ .style(.initialize)
<<< Image(cgImage, mode: .doubleWH)
<<~ .page(.printAndFeed(lines: 1))

Image(cgImage, mode: .doubleWH) is key code.