Documentation
Setting Up A Raw Printer in OSX
Compatibility
This tutorial is for raw printers only. If unsure please see What is Raw Printing?
Deprecation Notice
This article is deprecated as macOS 27 (“Golden Gate”) removed the ability to modify printer queues via web interface. Please use { forceRaw: true } instead.
Background
These steps will allow a USB, Network attached printer to receive raw commands through Java on Apple OS X. Note, Serial and Parallel printers are not longer supported in macOS.
Steps
-
Open a Terminal window: ⌘(Option)+space > Terminal > Enter
-
Enable CUPS web interface by entering this into the Terminal:
sudo cupsctl WebInterface=yes -
Load Safari to the CUPS web interface http://localhost:631 and click the Administration tab > Add Printer

-
If you see your USB raw printer in the listing, DO NOT select it.
-
Click AppSocket/HP JetDirect > Continue

-
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 usbNote: You do not need the “?location=1a200000” information.

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.
-
-
Enter an appropriate Name, Description, and Location for your printer.
Note: If you encounter issues searching for your printer, please see #131

-
Leave the “Share This Printer” box unchecked and hit Continue.
-
Make: Raw > Continue > Add Printer

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.
-
Starting Banner: None
Ending Banner: None
Click Set Default Options
-
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
Adding a printer class is purely optional and allows the raw device to be listed in the System Preferences, Print & Scan area of the desktop. Without a printer class, the printer will function properly but will not be listed in the Print & Scan area.
-
From the CUPS web interface, click Administration > Add Class

-
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
-
in Members, select the raw printer name chosen previously > Add Class
-
in System Preferences > Print & Scan, your new printer class will be listed. You may use this to monitor print jobs.

To learn how to print from a webpage continue to:
Edit this page