cups, lpr and -o options like cpi

Discussion in 'Apple' started by joseph.santaniello, Jun 18, 2005.

  1. Hi everyone,

    I am trying to print some text files via the commandline, which works,
    but it seems the cpi, and lpi options are ignored. Any suggestions on
    how do this?

    lpr -o cpi=12 sample.txt

    looks just the same as

    lpr -o cpi=8 sample.txt

    The results are the same on my LaserJet 1300, DeskJet 960C, and Dymo
    LabelWriter. So it's something happening early in the process. Does the

    default cups setup use Ghostscript? My system has it, but I don't
    remember if it was me who put it there. Are there some gs options I
    should be passing?

    The idea is to be able to do simple formatting for printing text files
    via the command line.



    PS: For anyone curious, I want to do this to use my Dymo as a reciept
    printer for my home-grown (sucky but free) Point Of Sale system.
    joseph.santaniello, Jun 18, 2005
    1. Advertisements

  2. joseph.santaniello

    Tom Stiller Guest

    It would help to know which version of Mac OS you're using. Assumong
    it's a recent version of OS X, printing is controlled by CUPS and from
    the CUPS documentation:
    5.2.4 cpi (type2 enum)
    The cpi attribute specifies the number of characters per inch when
    printing text files. Only the values 10, 12, and 17 are currently
    supported. The default value is 10.
    Tom Stiller, Jun 18, 2005
    1. Advertisements

  3. joseph.santaniello

    Ilgaz Ocal Guest


    Looks like you are a unix guy :) I just remembered Epson note about the
    standard unix printer test, it maybe related:

    Why when I tried to test my Epson printer by ‘cat. cshrc > /dev/lp0'
    nothing prints?

    FileID: KB020223EN

    The classic test of printer connectivity (sending an ASCII file to it)
    doesn't work on many Epson printers out of the box (or after printing
    from Windows or Macintosh).
    Epson printers from the Stylus Color 740 and newer use a special
    "packet mode" in which they do not recognize standard commands or ASCII
    They must be sent a special sequence that takes them out of packet mode.
    The command escputil -u -s -r /dev/lp0 will take the printer out of
    packet mode and enable you to print to it. As soon as you've read back
    status from the printer, you know it's working.

    Also, for cups you know , your printer is at
    standard cups port,

    I messed around with CUPS yesterday including a trial for the "real"
    CUPS (pro version with drivers), because I am new to colour laserjets
    and this thing doesn't have a real postscript built in (too much $$$) I
    gave up for now.

    If you try on Tiger, its uninstaller deletes some cover pages by the
    way :) Thank God for Pacifist and printer setup repair, they saved a
    future stupid problem.

    I am not sure your printer problem related but consider yourself lucky
    with cups etc since HP got much more stuff than Epson for instance. You
    know, postscript drivers, PCL etc.

    Ilgaz Ocal, Jun 18, 2005
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.