apple / cups

Apple CUPS Sources
https://www.cups.org
Apache License 2.0
1.96k stars 464 forks source link

How to set offset to printer's ribbon? #6126

Open AndroidDesigner opened 1 year ago

AndroidDesigner commented 1 year ago

Hello I'm using the Zebra ZPL label driver for a label printer on a Ubuntu OS. Everything work fine, except I want to set a horizontal offset in the left side of ribbon, so that it print with an offset on the label.

  1. I tried with changing ppd file of my printer (in /etc/cups/ppd), but nothing happened.

  2. Also, I tried lp -o left-page=value(to points) -d printerName fileName command, but when the left-page argument is small, no effect is seen and large value of left-page affects on the size of label and makes it very small (while the value passed to the left-page is true). example: suppose my label is 1.5*1 cm and now ribbon is printing from left-side exactly (I have to shift label to the left side of printer physically so that my sensors can act). So I want to shift ribbon printing 0.15inch to the right, so I used: lp -o left-page=10 -d printerName fileName ---> no offset occurs. lp -o left-page=50 -d printerName fileName ---> it shifts a little, but reduces size of print in both vertically and horizontally.

What is the problem/solution? Thanks

lhojun commented 1 year ago

did you solve this problem?

i'm using TSC MH241 i found AdjustHoriaontal(i think typo of AdjustHorizontal), AdjustVertical and VerticalOffset in my PPD file(MH241.PPD) so i think you can handle the offset using these options.