Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

I have a (cheap Chinese) thermal printer with USB connection with Windows and Linux drivers. I tested installing the Linux driver PPD with Gutenprint and usbtb at first without any luck.

So I would like to be able to send text-only direct to the printer. I can't see any virtual device under /dev/ that seems to correspond to the printer.

The output from System Information looks like this:

Generic Bulk Device:

  Product ID:   0x5011
  Vendor ID:    0x0416  (Winbond Electronics Corp.)
  Version:   3.00
  Serial Number:    1234567890
  Speed:    Up to 12 Mb/sec
  Manufacturer: Generic
  Location ID:  0x14100000 / 1
  Current Available (mA):   500
  Current Required (mA):    100
  1284 Device ID:   print00

Is there a way to send text (ASCII) to the printer?

When Mac OS X tries to identify the printer it manages to send PostScript code that the printer outputs verbatim so at least some parts of the communication with printer works. If I just could avoid sending PostScript code and instead just send ordinary text.

Receipt with printed PostScript code

share|improve this question
    
Do you use Terminal ? –  Buscar웃 Jun 13 '13 at 17:22
    
@Buscar웃 Well, I use iTerm2 but one problem is that lp doesn't give me raw access to the printer or usbtb but just uses the existing printer drivers. I guess a text-only printer driver would suffice for my needs but I haven't found one. –  moonhouse Jun 17 '13 at 8:42
    
If you can't setup a printer through the usual Finder interface, you can try to access the CUPS web interface at: http://localhost:631/ –  mouviciel Jun 17 '13 at 13:43

1 Answer 1

up vote 2 down vote accepted

I managed to install a raw printer driver and print to it from the command line.

Using CUPS/Gutenprint's web interface at http://localhost:631/ I added a printer with device URI

usbtb://Generic%00%00%06/Generic%20Bulk%20Device?serial=1234567890

and selected "Raw" as the make for the printer. (Please note that the serial URI parameter corresponds to the serial number for the USB device as listed in the question!)

I can now see the printer listed when issuing the command lpstat -p -d

printer Generic_usbtb is idle. enabled since Tue Jul 16 23:04:11 2013

To print the text file text.txt I write lp -d Generic_usbtb test.txt

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.