Skip to content

Custom Sizes not supported on printers that use rastertolabel as a backend. #24

Description

@cvergaray

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:

  1. 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.
  2. 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
  3. Patch rastertolabel. Doubt this is going to happen, especially given that it is no longer maintained as it was replaced with LPrint.
  4. 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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions