Changes between Version 4 and Version 5 of GhostScriptRasterPrinting


Ignore:
Timestamp:
Oct 28, 2011, 7:18:59 AM (12 years ago)
Author:
Alex Taylor
Comment:

Formatting improvements

Legend:

Unmodified
Added
Removed
Modified
  • GhostScriptRasterPrinting

    v4 v5  
    1 == Ghostscript Raster Printing (a.k.a. Using Ghostscript as a Printer Driver) ===
     1== Ghostscript Raster Printing (a.k.a. Using Ghostscript as a Printer Driver) ==
    22
    33Ghostscript includes a not-insignificant number of built-in printer drivers, many of which are not otherwise supported by OS/2 or CUPS.
     
    88
    99Most of the discussion below focuses on the printers in the Epson driver collection for Ghostscript, but it should work equally well for any built-in Ghostscript printer driver.
     10[[br]][[br]]
    1011
    1112== Basic Procedure ==
    1213
    13 The Epson Ghostscript drivers discussed by Dmitry (below) are now included in Paul Smedley's distribution of GhostScript, as of version 9.00, and also as an update to version 8.71 (included in the WPI distribution).
    14 
    15 This technique describes how to send the print job directly from the application --> GhostScript --> printer without having to go through the intermediate stage of running GSView.  Basically, this is made possible using the new [http://svn.netlabs.org/unipdr UNI.PDR] universal port driver:
     14The Epson Ghostscript drivers discussed by Dmitry (below) are now included in Paul Smedley's distribution of Ghostscript, as of version 9.00, and also as an update to version 8.71 (included in the WPI distribution).
     15
     16This technique describes how to send the print job directly from the application --> Ghostscript --> printer without having to go through the intermediate stage of running GSView.  Basically, this is made possible using the new [http://svn.netlabs.org/unipdr UNI.PDR] universal port driver:
    1617
    1718 * Install UNI.PDR (to \OS2\DLL)
    1819 * Create a new port of type UNI.
    19  * Edit the port properties.  We need to send the print job through two programs: GhostScript, followed by whatever command actually sends the job to the printer.  Unfortunately, UNI.PDR doesn't currently support piping the job through multiple programs, so you have to use a REXX script or similar to link the programs together.
     20 * Edit the port properties.  We need to send the print job through two programs: Ghostscript, followed by whatever command actually sends the job to the printer.  Unfortunately, UNI.PDR doesn't currently support piping the job through multiple programs, so you have to use a REXX script or similar to link the programs together.
     21
     22The details of this REXX script depend on what kind of printer connection you have.  The program that actually sends the data to the printer is going to be different for network printers, for parallel/serial ports, and for USB connections.
     23[[br]][[br]]
    2024
    2125=== Printing to a Network Printer ===
     
    2428
    2529{{{
    26 /* GS2LPR.CMD - print to a TCP/IP printer through GhostScript, using LPR.
     30/* GS2LPR.CMD - print to a TCP/IP printer through !GhostScript, using LPR.
    2731 *
    2832 * The top-level GhostScript directory should be set in the environment
     
    7175Using the above, the following [http://svn.netlabs.org/unipdr UNI.PDR] settings will allow printing to a networked LP-9400 printer with TCP/IP address 192.168.1.100:
    7276
    73  * '''Path and file:''' {{{cmd.exe}}}
    74  * '''Parameters:'''    {{{/c c:\os2\gs2lpr.cmd lp9400 192.168.1.100 * %file%}}}
    75 
    76 You could presumably print to a Samba printer by using smbspool instead of lpr. 
     77 ||=''Path and file'' =||{{{cmd.exe}}} ||
     78 ||=''Parameters''    =||{{{/c c:\os2\gs2lpr.cmd lp9400 192.168.1.100 * %file%}}} ||
     79
     80You could presumably print to a Samba printer by using {{{smbspool}}} instead of {{{lpr}}}. 
     81
     82(''Don't'' try to print through CUPS -- i.e. with {{{cupslpr}}} -- using this technique, because the job will already be in printer-specific format at that point; CUPS expects to receive Postscript input, and will choke as a result.  In any case, you're presumably using this technique because printing via CUPS doesn't work in the first place.)
     83[[br]][[br]]
    7784
    7885=== Printing to a Local Parallel or Serial Attached Printer ===
     
    123130
    124131In this case the UNI port settings for a printer on LPT1 would be:
    125  * '''Path and file:''' {{{cmd.exe}}}
    126  * '''Parameters:'''    {{{/c c:\os2\gs2port.cmd lp9400 lpt1 %file%}}}
    127 
     132||=''Path and file '' =|| {{{cmd.exe}}} ||
     133||=''Parameters ''    =|| {{{/c c:\os2\gs2port.cmd lp9400 lpt1 %file%}}} ||
     134[[br]][[br]]
    128135
    129136=== Printing to a Local USB Attached Printer ===
     
    132139
    133140First of all, the UNI port settings for the printer object look something like:
    134  * '''Path and file:''' {{{cmd.exe}}}
    135  * '''Parameters:'''    {{{/c c:\os2\gs2q.cmd lp9400 LP-9400-Raw %file%}}}
     141||=''Path and file'' =|| {{{cmd.exe}}} ||
     142||=''Parameters''    =|| {{{/c c:\os2\gs2q.cmd lp9400 LP-9400-Raw %file%}}} ||
    136143
    137144Next, it's necessary to create a ''second'' printer object (in this example called "LP-9400-Raw") which prints to the actual USB port.  However, this second printer must use the IBMNULL printer driver with the spool file format set to PM_Q_RAW.
     
    186193}}}
    187194
    188 This seems to work here, although I had problems until I made sure to use Ghostscript 8.71 (instead of 9.x).  It also appears to be very important that the "default spool file type" in the IBMNULL printer driver properties is set to use PM_Q_RAW (and ''not'' PM_Q_STD).
     195This seems to work here, although I had problems until I made sure to use Ghostscript 8.71 (instead of 9.0''x'').  It also appears to be very important that the "default spool file type" in the IBMNULL printer driver properties is set to use PM_Q_RAW (and ''not'' PM_Q_STD).
    189196
    190197Note that this script as shown doesn't accept blanks in the printer name, so you should name your IBMNULL printer accordingly.
    191 
    192 
    193 == Additional Remarks ==
    194 
    195 (''Don't'' try to print through CUPS -- i.e. with cupslpr -- using this technique, because the job will already be in printer-specific format at that point; CUPS expects to receive Postscript input, and will choke as a result.  In any case, you're presumably using this technique because printing via CUPS doesn't work in the first place.)
    196 
     198[[br]][[br]]
     199
     200
     201----
    197202== Original Note ==
    198203