Recent Articles


KOffice 1.5 Released For Linux
The newest version of KOffice offers OpenDocument as the default file format and presents a new project planning tool, KPlato.

We Have the Brains
At Do sandals and ponytails really hold back Linux? former Massachusetts chief information officer Peter Quinn complains that the Linux community is unprofessional and that this is holding back more widespread adoption of Linux. I'm sure he really believes that.

The Best Mac OS Is Ubuntu
Not many people expected the "replace your proprietary OS with Linux" movement to strike a blow against the engineers in Cupertino instead of Redmond, but that is just what one educator has done.

Enabling Linux telnet
This has to be one of the more common support calls that I get...

Mozilla Extends Prizes To Firefox Winners
The contest to find the best of the extensions and their developers for the Firefox browsers yielded ten winners out of the over 200 submissions received.

VMware's Threat to Microsoft
First off, I'm not suggesting VMware is gunning for Microsoft. However, recent developments in their product line aren't exactly favorable to Microsoft.

IBM Subpoenas Microsoft About SCO
The long legal feud between IBM and SCO over alleged infringement of source code owned by SCO took a dramatic step in its discovery phase.


04.26.06


GDI Printers

By A.P. Lawrence

"But I'm just sending data to Windows - why doesn't the Windows printer driver just take care of it?"

I probably hear that question at least a dozen times a year. Somebody wants to send Unix/Linux print jobs through Samba to a shared Windows printer and it's not working. Why not?

Well, if the printer is a so called GDI, Windows-only ( sometimes called host-based) printer, the reason is simple: you aren't giving the driver what it wants.

GDI printer drivers expect GDI data, a Microsoft format that is used both for displays and printers. It's basically a bit map of the page to be printed, but what's more important is what it is not: it isn't text, it isn't PostScript and it isn't PCL. The driver that Windows sends the GDI data to can't handle anything complicated like that; it can't convert text to graphics, can't draw lines from vector descriptions, etc. It needs GDI data and that's that.

You'd think that there would be things that convert arbitrary data (text? PostScript?) to GDI. In fact, if you are even vaguely familiar with Linux, you would immediately think that GhostScript has an output that will produce GDI. You'd be right, too, except that it's apparently only available on Windows Ghostscript. That's called "mswinpr2", and you'd use it in combination with Redmon (a Windows print redirector) to do the translation. See Creating a Virtual Postscript Printer in Windows using Ghostscript for details.

You could also use PrintFile but again, that's done on the Windows side.

You'd think that the easy way to do this would be to produce GDI output on the Linux side and then ship that through Samba to unmodified Windows machines. Or that's what I'd think anyway, and tantalizingly enough, "gs --help" lists "gdi" as one of its output formats. However, it looks to me like that produces PJL files. Unless I'm horribly misunderstanding what GDI looks like (see GDI printers under Linux), this isn't the answer.

Free to Develop, Deploy. Oracle Database XE.

There ARE Linux drivers for some GDI printers. These seem to be printer specific and don't solve the general problem of shipping to any old Windows shared printer. There's also a "libgdiplus" that's part of Mono; the description makes you wonder if it could be used to construct such a general purpose translator.

If anyone reading this knows more than I do about this, please do comment. At a casual glance, converting to GDI seems like the most direct method - and indeed it's what the Windows GhostScript does. I suspect the reason is that the Windows GS mswinpr2 can call upon Windows DLL's to do it's work, and that's why I wonder if Mono's libgdiplus would be the answer for that.. but I haven't been able to find out enough about that to say.


About the Author:
A.P. Lawrence provides SCO Unix and Linux consulting services http://www.pcunix.com

About LinuxProNews
LinuxProNews is a collection of news and commentary designed to keep you in step with the ever evolving landscape of Linux environments. Opensource News and Advice for Linux Professionals

LinuxProNews is brought to you by:

SecurityConfig.com NetworkingFiles.com
NetworkNewz.com WebProASP.com
DatabaseProNews.com SQLProNews.com
ITcertificationNews.com SysAdminNews.com
LinuxProNews.com WirelessProNews.com
CProgrammingTrends.com DevWebPro.com


-- LinuxProNews is an iEntry, Inc. publication --
iEntry, Inc. 2549 Richmond Rd. Lexington KY, 40509
2006 iEntry, Inc.  All Rights Reserved  Privacy Policy  Legal

archives | advertising info | news headlines | free newsletters | comments/feedback | submit article


Opensource News and Advice for Linux Professionals LinuxProNews News Archives About Us Feedback LinuxProNews Home Page About Article Archive News Downloads WebProWorld Forums Jayde iEntry Advertise Contact