Closed Zedelghem closed 2 years ago
It can be done similar to this:
# Setup
service = print_service.PrintService(60, 1, 5)
service.start(PRINTER_MAC, PRINTER_MODEL)
# Open
image = PIL.open('image.png')
concentration = 1
# Wrapper
def wrap_print_image(p: ppa6.Printer):
p.setConcentration(concenttration)
p.printImage(img)
# Submit
service.add_print_handler(wrap_print_image)
Or with labmda
service.add_print_handler(lambda p: p.printImage(PIL.open('image.png'))
Added in commit https://github.com/bitrate16/ppa6-python/commit/d7820b708a551be4dafeff1d78868215d2a489e9, untested
Thank you so much! Looking into it right now.
Have you thought about adding a possibility to print images through your print_service module?
Best Bj