Linux/OSX - Printing to Unsupported Printers (e.g. Canon MF5770)

Some printers cannot be used directly from Linux or OS X. These are typically budget printers, which do lots of GDI print processing in a Windows driver, and they speak only a proprietary protocol.

This story tells how to use a Windows-only printer from Linux and OS X. I use this with my Canon MF5770, but the general process works for almost any Windows based printer.

Getting Started

You'll need a copy of Windows 2000/XP/Vista/Windows 7, running on a real machine, or in a VM. VMware or VirtualBox (vbox) will work. This virtual/physical machine can be on another computer on your LAN; it need not be on the machine from which you want to print.

Sadly, none of this is going to work with WINE or Crossover. You'll need a real copy of Windows running in a VM or on a physical machine.

Get the printer working from Windows before proceeding.

Install Ghostscript and RedMon

This is all done on the Windows machine that can print to the Windows-only printer.

  1. Download Ghostscript from http://pages.cs.wisc.edu/~ghost/doc/GPL/gpl864.htm. You'll want to select the 32-bit or the 64 bit .exe file, to match your Windows edition. I used version 8.64, but newer versions should work too.
  2. Install Ghostscript
  3. Install GSview. There's a link to it from the Ghostscript page mentioned above.
  4. Install RedMon EE.
  5. Set up RedMon:
  • Redirect this port to the program: C:\Program Files\Ghostgum\gsview\gsprint.exe
  • Arguments for this program are: -printer "Your Windows Printer Name Here" -copies 1 -
    • Don't miss the trailing dash on the arguments!
    • "Your Windows Printer Name Here" should be the name of the printer that works from Windows. This is the printer name you see when you open Start -> Printers and Faxes.
  • Output: Program handles output

Set Up Virtual PostScript printer

This is all done on the Windows machine that can print to the Windows-only printer.

  1. Using Windows add-a-printer dialog, add an "AppleLaserwriter 12/640 PS" printer.
  2. Set it to print to local port "RPT1: Redirected Port"
  3. Share this Printer

Using the Virtual PostScript Printer

You've got a shared Windows PostScript printer on your network. On your Linux or OS X machine, connect to the shared printer, use an AppleLaserwriter 12/640 PS driver (or a generic PostScript driver, if you don't have this exact driver).

When you print to the shared PS printer, RedMon captures the PostScript data, sends it through Ghostscript, and Ghostscript prints it to the Windows-only printer. The printer is a little slow to start, since the ENTIRE document has to get processed from whatever, into PostScript, into GDI, and spooled on the Windows machine, before printing starts. But it works.

If your printer is a printer/scanner (e.g. Canon MF5770), you can connect the scanner to the VM, and have the VM save scanned images to a shared folder, and your Linux/OS X machine can collect the scanned images from there. If your scanner needs buttons pushed in Windows (e.g. answering prompts such as "Do you want to save this document?", you can automate this using PTFB or AutoHotkey.

Comments

Comment: 

There is a gap in the documentation for Redmon that I can't seem to find a way around. After installing RedMonEE 1.9.0 using the setup.exe included in the zip archive, the instructions state to Add a Port in the Add Redirected Port dialog box but I've been unable to locate this dialog box. I've started redmonS and located a dialog box under Options -> Parameter and Options but this Dialog box looks nothing like the one in the documentation. Also your instruction states to "Redirect this port" but doesn't indicate what this port is and where to do so. Could you please clarify on this step?

Comment: 

When I ran setup.exe for RedMon, I got the "Add Redirected Port" dialog as part of the setup process.

However, if you skipped over it (or it didn't show up for some reason), you can still get there. Go ahead and define a printer (run the Windows add-new-printer wizard, from "Printers and Faxes" on the Start Menu, if you're running XP). Define a "Local Printer" without automatically detecting Plug-and-Pray devices.

At the Select a Port dialog, choose the existing port named "RPT1:" and press Next. When you're asked to choose a printer model, choose a PostScript printer. (I chose "Apple LaserWriter 12/640 PS".) You'll want to click Next after you've selected a printer model. Go ahead and finish adding the printer.

OK. Now here's how you get to the the dialog to configure the redirected port -- Right-click on your added printer, choose Properties, then Ports, then Configure Port. You'll see the dialog where you can enter the incantations I provided above.

IF YOU DON'T HAVE AN RPT1 port to choose, you can create it by:

  • Right-click on any existing printer.
  • Choose Properties, and then choose Ports.
  • Press the Add Port button, and choose Redirected Port from the Available Port Types.
  • Press the "New Port..." button.
  • Name your new port "RPT1" (or RPT2 or ...)
  • Press Close/Accept/OK/whatever until you're back at the Ports tab for your new printer
  • Choose the port you added, and press Configure Port.

Then you're looking at the same dialog to configure the redirected port as if Setup had shown you the dialog.