smalot / cups-ipp

CUPS Implementation of IPP - PHP Client API
GNU General Public License v2.0
107 stars 56 forks source link

How can I set a margin left print attribute ? #1

Open DonTermi opened 6 years ago

DonTermi commented 6 years ago

Hello,

thanks for your package. It works greatfully for my label print application. But for one printer I need a margin left to printing the label. It is lightly displaced. How can I set a margin left for ipp?

I tried many things ... But response was always "property unknown". I´m using cups as print server. It´s a Zebra TLP 2844 printer.

Hope you can help me. Thank you.

usb248 commented 6 years ago

I print labels with this printer too. (zebra printer). I send ZPL params code in order to set margin

DonTermi commented 6 years ago

Can you tell me a examle please? thank you

usb248 commented 6 years ago

Like this. My zebra printer interprets the ZPL code :

^XA~TA000~JSN^LT0^MNW^MTT^PON^PMN^LH0,0^JMA^PR6,6~SD15^JUS^LRN^CI0^XZ
^XA
^MMT
^PW320
^LL0160
^LS0
^FT7,30^A0N,20,20^FH\^FD^FS
^FT7,60^A0N,30,28^FH\^FDBLine 1^FS
^FT7,90^A0N,20,18^FH\^FDLine 2^FS
^FT7,150^A0N,50,50^FH\^FD^FS
^FT275,150^A0N,50,50^FH\^FDA^FS
^PQ1,0,0,N
^XZ

(FTx,y) Example : FT7,30 = 7 from the left, 30 from the top

rvarkelen commented 6 years ago

@usb248 @smalot Can I ask how you print ZPL code with this library? I get the ZPL codes on my label, instead of a barcode. What attributes are needed to print ZPL?

usb248 commented 6 years ago

On a linux OS, i installed a CUPS service (IP_LOCAL:631). I can configure cups and add network printers. If you print ZPL codes without your printer interpreting it, it's because you didn't configure the right driver. (For me, the correct driver is : generic text-only printer) capture

rvarkelen commented 6 years ago

@usb248 Thanks, works like a charm 👍