Printers that use rastertolabel, i.e. Zebra, Brother, and Dymo printers do not respect the custom size provided by the application, so they will always print with the default size when a custom size is provided.
rastertolabel determines the label size from:
- The CUPS Raster header (width/height in pixels)
- The printer’s DPI
- The printer’s firmware defaults
It does not read:
- PageSize=CustomPageSize
- cupsWidth
- cupsHeight
- IPP media values
So attempts to set custom size via CUPS options always fail.
There are four options to fix this:
- Don't fix it. When a printer does not support print-time defined page sizes, automatically switch between printer-defined sizes to find one that fits the generated content (i.e. for continuous media). I probably will implement this as a fallback for those that don't want to deal with lprint.
- Use raw queue and send printer-specific commands (i.e. direct ZPL when communicating with a ZPL printer.) The idea behind using CUPS in the first place was to get away from vendor lock-in. This would make it difficult to maintain for every printer. Additionally, raw queues are being deprecated in CUPS per this announcement: https://openprinting.github.io/cups/drivers.html
- Patch rastertolabel. Doubt this is going to happen, especially given that it is no longer maintained as it was replaced with LPrint.
- Use LPrint. It is unclear if this driver supports custom, self-described sizes. The documentation suggests that it does, but I have not tested this. I had trouble getting it working when I threw it on a pi print server.
Printers that use rastertolabel, i.e. Zebra, Brother, and Dymo printers do not respect the custom size provided by the application, so they will always print with the default size when a custom size is provided.
rastertolabel determines the label size from:
It does not read:
So attempts to set custom size via CUPS options always fail.
There are four options to fix this: