Printing to a Windows GDI printer from Linux
by Mostafa on Feb.20, 2012, under Hardware, How To ..., Linux
Quite a few of the cheaper laser printers are difficult to use directly on Linux due to missing drivers. The reason is that quite a bit of the work is actually done by the (Windows) driver rather than the printer itself. These printers have come be known as GDI or Winprinters. The EPSON AcuLaser C1750 is such a printer. After struggling for a few days, trying to get it to work natively under Linux, I decided to look for an alternative solution [Update: see bottom of article]. Then I found one.
The basic idea is to create a dummy shared PS printer on a Windows host and then also install the physical printer there. The dummy printer accepts PS jobs from Linux clients and then filters them through Ghostscript before feeding them to the physical printer using the native Windows GDI driver. I did need to change some of the steps compared to the guide above, so I’ll provide a short guide here for others who may be looking to get their Winprinter working with Linux.
This is only a rough guide meant to give an idea of the steps required. You may need to figure out any appropriate intermediate steps and install the necessary software dependencies (e.g., samba).
Step 1: Find a networked Windows box and install the printer there
I used an instance of Windows XP running in VirtualBox on the print server itself. The networking is set to ‘Bridged’ to allow connection from others on the network.
Step 2: [Windows] Install Ghostscript, GSView and RedMon – in that order
All of the above can be found at: http://pages.cs.wisc.edu/~ghost/. I used GPL Ghostscript 9.02, GSview 5.0 and RedMon 1.7 on the Windows guest VM.
Step 3: [Windows] Configure GSprint for non-interactive printing
This is done by creating a configuration file (gsprint.cfg) in the same directory as the gsprint.exe executable. This should be in “$PATH_TO_GSVIEW”. I put the following in gsprint.cfg:
-noquery -color -printer EPSON AL-C1750N
Note that each option must go on a separate line and “EPSON AL-C1750N” is the name of the printer as it appears in the Windows Control Panel. Again, note that the printer name is specified without quotes. The original guide also specifies the -ghostscript option but I found that it fails to work with that. It was best to let gsprint choose the correct Ghostscript binary automatically.
After creating the configuration file for gsprint, it is prudent to check that it functions as expected by running the following from a Windows command line:
> cd $PATH_TO_GSPRINT > gsprint sample_ps_file.ps
The printer should now produce the sample PS file without any further input/intervention from the user.
Step 4: [Windows] Create dummy PostScript printer(s)
Use the “Add new printer” to create dummy PS printers. I created two of them — one for grayscale output and one for color. When creating the printers, choose “Local printer” and then “FILE:” as the port type. I chose the “Canon PS-IPU Color Laser Copier v52.3” as the printer model because it is a PostScript color laser printer that would allow both color and grayscale printing. The guide suggests something like the “Apple LaserWriter II NT” but that only produces grayscale output. I named the first printer “PSPrinter_BW” and the other “PSPrinter_Color”. The properties of the printer were set such that jobs sent to PSPrinter_BW are printed in grayscale while those sent to PSPrinter_Color are printed in color. Sharing is also turned on for both printers.
Step 5: [Windows] Set dummy printers to use RedMon
For each of the printers, go to “Printer properties” -> “Ports” -> “Add port”. Select “Redirected port” and click “New port”. Specify a name for the port, e.g., “RPT1:”. After adding the port, go to “Configure port” and fill out the necessary settings. For PSPrinter_Color, I have:
Redirect to program: $PATH_TO_GSPRINT.EXE Arguments for program: - Output: "Program handles output" Run as user: [ ] (i.e., unchecked)
For PSPrinter_BW, I have:
Redirect to program: $PATH_TO_GSPRINT.EXE Arguments for program: -mono - Output: "Program handles output" Run as user: [ ] (i.e., unchecked)
Click “OK” and close the printer properties dialog. Check that the port redirection works by printing something to PSPrinter_* and collecting the output from the physical printer.
Step 6: [Linux] Add share dummy printers to Linux
Using the printer administration module, add the shared PS printer(s) as “Windows Printer via SAMBA”. For the printer model/driver, I chose “Generic” -> “PostScript Printer”.
That’s it! It should now be possible to print to the physical printer from Linux by sending the job to the printer created in Step 6.
Update [18 July, 2012]: The EPSON AL-C1750N appears to work with the Linux drivers for the Xerox Phaser 6000. On 64bit Centos 6 it was also necessary to install the 32bit version of cups-libs. This was pointed out by Lathrop in the comments.
June 5th, 2012 on 11:25 pm
Good post ! Thanx a lot !
July 18th, 2012 on 10:37 am
I believe that the Epson C1750 might be internally identical to the Dell 1350CNW and the Xerox Phaser 6000. So if you want to print directly, you might want to try the Xerox Driver from there: http://www.support.xerox.com/support/phaser-6000/downloads/engb.html?operatingSystem=linux&fileLanguage=en_GB
I’d appreciate an email if it works.
July 18th, 2012 on 2:34 pm
I can verify that it does indeed work with the Xerox Phaser drivers. Just make sure you have the 32bit cups-libs installed if you are running a 64-bit OS. Thanks Lathrop!
August 15th, 2012 on 12:13 pm
Thanks for suggestion on using xerox 6000b for dell 1350cnw. it worked great on my linux install. Peppermint 3 (ubuntu openbox variant) 32 bit.
Howard
August 25th, 2012 on 8:10 pm
Wow, thanks a lot!
January 8th, 2013 on 10:21 pm
Hi,
do the Epson C1750N (N as Network) works fine with the Xerox Phaser 6000 and in a network area with Ethernet ?
Beacause on the website http://www.openprinting.org/printers for Linux system, the printing machine Xerox Phaser 6000 does not exist, only the 6100.
or 6120 and Phaser 6100 = mostly and not perfectly.
The DELL 1350cnw is not mentioned at all.
Thanks for your answer because I need to buy the printing machine
Epson C1750N
Antoine Waché
January 9th, 2013 on 7:46 am
Hi Antoine, yes, the C1750N does work as a network printer with the Xerox Phaser 6000 driver.
January 9th, 2013 on 12:07 pm
Thanks.
Epson C1750N has the automatic print recto/verso ?
January 9th, 2013 on 12:26 pm
If you mean duplex, then no.
January 10th, 2013 on 10:08 pm
I mean if the Epson C1750N is able to print automatically on the two
sides of a A4 paper.
Thanks.
January 10th, 2013 on 10:32 pm
No, the C1750N does not have an automatic duplexer. You will have to do it manually if you want double-sided printouts.
January 11th, 2013 on 12:48 pm
Thanks Mostafa.
I’m looking for a color laser printer :
-automatic double-sided printouts
-ethernet connection
-not expensive toner cartridge (less than 40 dollars each)
-perfectly recognised by any GNU/Linux (even with an other driver as
the Epson C1750N)
Best regards.
January 11th, 2013 on 1:01 pm
Sorry, I don’t have any suggestions. However, if you do find one that satisfies these requirements, please add a comment! Thanks.