Skip to content

Setting Up A Raw Printer in OSX

Tres Finocchiaro edited this page Feb 9, 2016 · 34 revisions

Compatibility

  • ✅ 2.0 | ✅ 1.9 | ...

This tutorial is for raw printers only. If unsure please see What is Raw Printing?

Background

These steps will allow a USB, Network, Serial or Parallel attached printer to receive raw commands through a WebSocket capable web browser on Apple OS X. If your web browser does not support websockets, see legacy applet instructions below.


Steps

  1. Open a Terminal window: ⌘(Option)+space > Terminal > Enter

  2. Enable CUPS web interface by entering this into the Terminal:

    sudo cupsctl WebInterface=yes
  3. Load Safari to the CUPS web interface http://localhost:631 and click the Administration tab > Add Printer

    image

  4. If you see your USB raw printer in the listing, DO NOT select it.

  5. Click AppSocket/HP JetDirect > Continue

    image

  6. You will be prompted for a port.

    For USB Printers

    • Type: (example) usb://Zebra/LP2844

    • Get this port by issuing the command: lpinfo -v |grep

      Note: You do not need the "?location=1a200000" information.

      image

    For Network Printers

    • Type: (example) socket://192.168.254.254:9100
    • The IP address may be configured to use a different address, which is outside the scope of this tutorial.
  7. Enter an appropriate Name, Description, and Location for your printer.

    Note: If you encounter issues searching for your printer, please see #131

    image

  8. Leave the "Share This Printer" box unchecked and hit Continue.

  9. Make: Raw > Continue > Add Printer

    image

    Note: Some print drivers, such as Zebra ZDesigner or CUPS Zebra driver have dual-mode drivers capable of accepting Raw commands as well as PostScript commands. If Raw printing works with the vendor supplied driver, choose that over the Generic/Raw driver.

  10. Starting Banner: None

    Ending Banner: None

    Click Set Default Options

  11. You may now print to your printer. Continue to the next section Adding a Printer Class to make the printer appear in System Preferences, Print & Scan


Optional - Adding a Printer Class

  1. From the CUPS web interface, click Adminstration > Add Class

    image

  2. Enter an appropriate Name, Description, and Location for your class. It must differ from the raw printer name chosen previously.

Note: If you encounter issues searching for your printer, please see #131

  1. in Members, select the raw printer name chosen previously > Add Class

  2. in System Preferences > Print & Scan, your new printer class will be listed. You may use this to monitor print jobs.

    image


To learn how to print from a webpage continue to:


Legacy Applet Version

Applies to applet version only

The below instructions are only relevant to QZ Print, and do not pertain to QZ Tray 1.9 or QZ Tray 2.0

The sample.html provided with QZ Print is intended to run from the local file system, however Safari and Firefox will not run the applet unless it is hosted from a web server. MAMP is recommended for this, which will run a portable web server on your Mac Desktop. Installing and configuring MAMP is outside the scope of this tutorial.

  • Visit http://java.com/verify/ to confirm Java is installed and running properly.

  • Optional: Enable the Java Console from System Preferences > Java > Advanced > Java Console > Show Console (This is highly recommended for web developers.)

Safari must be configured to run the Applet in unrestricted mode or you will receive the following error:

"Cannot run program /usr/bin/lpr: error=1, Operation not permitted"
  1. Go to Safari > Preferences > Security > Manage Website Settings

  2. Select site to allow qz-print, and set it to Allow Always.

  3. Alternatively, you may run Java in "Unsafe Mode", which will have the same effect.

    Note: Some Safari updates have reported the above settings don't work. If you've recently updated Safari and Java is blocked, change the settings to "Block", then back to "Allow Always".

Clone this wiki locally