[[Lvlug] Print Drivers: Windows/Linux]
Tom Stoddard
tomshome@bellatlantic.net
Wed, 29 May 2002 11:05:12 -0400
> Tom,
>
> Can you fill s in on the details here? I know it has something to do
> with the GDI, but I can't remember the details.
>
I'll try, but it's not real clear to me. Some of this is speculation.
Windows GDI (Graphic Device Interface) is a programming interface that is
used to create images to be sent to a screen or to a printer. It is meant to
allow programmers to send images in a device independent manner. To create
an image, a program must first create something called a device context. A
device context is really just a block of memory used to hold the bit
patterns that are to be displayed. If the image is to be displayed on a
monitor then you use a display device context. For printing you use a
printer device context. Windows GDI uses the default printer driver to
determine the exact metrics of the actual output for the printer device
context.
Here's where the speculation comes in. Because the display, both on the
screen and the printer, varies when changing printer drivers, I assume that
the printer driver must dictate to Windows GDI how to display whatever image
needs to be displayed. (So much for device independence.) I don't know this
for sure, but I believe that postscript format solves this problem by using
a standard for describing output to a printing device. Therefore, systems
such as Macs and Linux don't usually experience these display variances
because of there reliance on postscript formatting.
Please don't accept this explanation as accurate since I'm basing it on
assumptions from reading that I've done not actual experience. The
development I've done has always been high level and not very graphics
intensive. Usually the only printing my applications produce are created
using report writing software such as Crystal Reports or MS Access.
Maybe someone else on this list can fill in some details or correct some of
this information.