Salesforce

Printing to File with CUPS

« Go Back

Information

 
Issue / QuestionHow to diagnose printer output issues?
How to create a file?
Applicable ToAll Zebra Printers
Resolution / Answer
IMPORTANT! Zebra suggests the use of the Common Unix Printing System (CUPS) driver for use on Mac OS X operating systems. The CUPS driver is pre-installed on Mac OS X operating systems. Therefore, it is not necessary to download and install a driver for Zebra printers on Mac OS X.

Zebra Mac OS X drivers are available for selected Zebra Card Printer models. List of ID Card Printers with Mac Drivers

A file showing the code being sent to the printer can be created. This file can be sent to Zebra support to assist in diagnosing print issues.

The first step required is to alter the CUPS Configuration File so that a File device option can be added and made available. The easiest way to access the Configuration File is through the CUPS driver.

Procedure
  1. Start from the CUPS driver Home page at either http://localhost:631/or 127.0.0.1:631
  2. From the Home screen select Administration.
  1. From the Administration page select Edit Configuration File.

The Configuration File opens in an editor.
  1. Add the following new entry at the very bottom of the file: FileDevice Yes.
  2. Then click Save Changes. You may be prompted for an administrator username and password. If you are unsure what this would be, you must contact your Linux or Mac Administrator.
 
NOTE Once the change is saved successfully, you can add a new Queue Name that can be used to send output to a file. This only needs to be entered once into your current Configuration File. Now you can complete the following steps to add printers with a path to a file entered.
  1. From the Home screen select Adding Printers and Classes.
  1. Select Add Printer (Classes are just a way of grouping similar printers if a customer chooses to).
  • The following screen appears.
Once Add Printer completes, select an option from the completed screen.
Next, choose AppSocket / HP JetDirect to provide the necessary entry point for the file path.
 
  1. Click continue.
In the Connection box, enter file:/ and the file name you wish to use.
  • For example:
    file:/ZebraCodeZPL.txt

 
IMPORTANT! An error occurred at the end of setup if File:/ was entered rather than file:/. This is case sensitive. No warning appears at the time of entry
 
  1. Click continue.
  2. Enter the Name that will display as the Queue Name.

Description and Location are not required.
  1. Click Continue and scroll down to Zebra. Then click Continue.
  1. Select the appropriate language based on the printer model you would be sent to:

Within the CUPS driver, Zebra printers are not selected by model, only by printer language.
  • CPCL is a mobile printer language (some mobile printers can also understand EPL or ZPL).
  • EPL1 and EPL2 are primarily desktop printer languages.
  • ZPL is primarily a tabletop printer language or desktops ending with a –Z (Ex: LP2844-Z).

*G-Series printers understand both EPL and ZPL.
  1. After selecting a language, click Add printer.
On this final screen, choose any desired settings for Media Size, Resolution, and Media Type, then click Set Default Options and the setup steps are complete.
 
 
  • To test, you could now print a Test Page by clicking the Printers tab.
  • Then click the new PrintToFileZPL Queue Name created.

A Print Test Page option is available in the drop-down list after clicking Maintenance.
 
On the Mac, this stores the file under Macintosh HD.
 

 
On supported Linux OS, it may be easier to specify file: /etc/ZebraCodeZPL.txt.
In this example, a ZPL file was created.
Once you have located the file, use a text editor to open and view its contents.
This Print Test Page option with the graphics data removed to show ZPL code only.
 
~SD30
~DGR:CUPS.GRF,103530,102,
….........^XA
^PR12,12,12
^LH0,0
^MNY
^LT120
^MTD
^MMC,Y
~TA120
^JZN
^FO0,0^XGR:CUPS.GRF,1,1^FS
^IDR:CUPS.GRF^FS
^XZ
 
If you are using multiple Queues for different printer languages, you could create a separate output file for each language.

Helpful Information
URL NamePrinting-to-File-with-CUPS
TitlePrinting to File with CUPS

Powered by