kylemacfarlane / zplgrf

Python utilities for converting to and from ZPL, GRF, PDF, and images
GNU General Public License v3.0
52 stars 11 forks source link

Improve Printer Compatibility - Remove Forced Print Mode #10

Closed bjallamo closed 1 year ago

bjallamo commented 1 year ago

This pull request aims to improve printer compatibility in the init.py file by removing the forced print mode and allowing the print mode to be determined by the printer settings. This change addresses the following:

Please review and consider merging it into the main branch.

kylemacfarlane commented 1 year ago

Firstly this is not a "print driver" and I don't claim compatibility with any printers and never will. The idea is to take the GRFs and wrap them in your own ZPL that will work with your printer. The ZPL that does exist is the most basic to get you started and for me to run the tests.

Removal of forced print mode: The print_mode parameter is no longer hardcoded as "C"

Print mode is not hardcoded to "C", it's fully customisable. You deleted the code which allows customisation and in essence you have hardcoded it to the printer default.

Instead, the print mode will depend on the printer settings, ensuring greater flexibility and compatibility.

Print mode is best set on a per job basis (which in ZPL means per label), allowing you to do things such as print a strip of labels and only cut after the last one. Your change would completely remove this ability and reduce flexibility and compatibility.

Prevention of label feed issues: The previous forced print mode caused the label to feed back

Backfeed is your printer trying to recalibrate the label position after a cut ("C" = cut mode). Your printer may also backfeed when you first turn it on or change the label roll. It's sometimes configurable how often / when it calibrates and when it will backfeed.

But if you don't have a cutter installed then you probably don't want mode "C" and don't need it to backfeed after every label. Presumably you want mode "T" (tear off).