.
introduction
documentation
screenshots
download
feedback
drivers

Drivers

Basic printer driver support can basically be categorized as

  • printers supported by GhostScript
  • PostScript printers

    The pdq distribution comes with a set of GhostScript drivers and a couple of generic drivers for PostScript-only and text-only printers. There are also a couple of specialized hybrid drivers included, and I will happily include any such specialties you send me.

    Also, PDQ and the Linux Printing Database now includes links to automatically generated pdq drivers. Thanks to Grant Taylor, for this wonderful repository.

    Don't forget is is easy to modify and customize these drivers to support printing of images and to include your favorite programs. See the driver hacking section below.

    The latest set of drivers and interfaces is available as a tar file, pdq-resources-2.2.1.tgz. You may also browse them.

    Interfaces

    Printers connected to your own machine can be printed to with "local-port". Printers connected directly to a network can likely be printed to with "bsd-lpd" or "tcp-port". Similarly for printers connected to a unix machine. Printers connected to a Macintosh can be printed to with "appletalk". Printers connected to a Windows machine are not currently supported, though it should be simple to write a (1 line, I think!) pdq driver using the "smb_print" utility. I don't have a network to test this on. Someone please create one and share it!

    Driver Hacking

    Say your printer is using a driver named "foo". Find where this is defined
       % pdq --debug-rc |grep foo
         parsing /etc/pdq/drivers/foo-1.2...
           defining driver foo in /etc/pdq/drivers/foo-1.2
    
    Append this driver to your own resource file
       % cat /etc/pdq/drivers/foo-1.2 >> ~/.printrc
    
    Use your favorite editor to edit the driver. Suppose you want to add support for jpeg images. Add this to the driver:
       language_driver jpeg {
          convert_exec { djpeg $INPUT | pnmtops > $OUTPUT}
       }
    
    Suppose you want text to be handled by "enscript". Remove the existing "language_driver text" entry and add this:
       option { 
          var = "ENSCRIPT_FLAGS" 
          desc = "Enscript plain text options"
          choice "r1" { 
             value = ""
             desc = "Standard"
             help = "Courier 12, plain "
          }
          choice "r2" { 
             value = "-r2 "
             desc = "Two-column, rotated"
             help = "Two-column, rotated, Courier 7"
          }
       }
       language_driver text {
          convert_exec { enscript -o $OUTPUT \
                            -b "$FILENAME %W Page \$% of \$="  \
                            $ENSCRIPT_FLAGS $INPUT 
    		     exit 0}
       }
    
    Well you get the point, have fun!

    If you have a contribution, please submit it. Mailing list, bug reporting, and forum are available via http://sourceforge.net/projects/pdq/.





    Copyright 1999, 2000 Jacob A. Langford
    Copying, distribution and modification are governed by
    the GNU General Public License version 2.
  • Hlo