Changes between Version 4 and Version 5 of GhostScriptRasterPrinting
- Timestamp:
- Oct 28, 2011, 9:18:59 AM (13 years ago)
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) == 2 2 3 3 Ghostscript includes a not-insignificant number of built-in printer drivers, many of which are not otherwise supported by OS/2 or CUPS. … … 8 8 9 9 Most 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]] 10 11 11 12 == Basic Procedure == 12 13 13 The Epson Ghostscript drivers discussed by Dmitry (below) are now included in Paul Smedley's distribution of Ghost Script, 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 --> Ghost Script --> 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:14 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). 15 16 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: 16 17 17 18 * Install UNI.PDR (to \OS2\DLL) 18 19 * 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 22 The 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]] 20 24 21 25 === Printing to a Network Printer === … … 24 28 25 29 {{{ 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. 27 31 * 28 32 * The top-level GhostScript directory should be set in the environment … … 71 75 Using 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: 72 76 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 80 You 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]] 77 84 78 85 === Printing to a Local Parallel or Serial Attached Printer === … … 123 130 124 131 In 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]] 128 135 129 136 === Printing to a Local USB Attached Printer === … … 132 139 133 140 First 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%}}} || 136 143 137 144 Next, 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. … … 186 193 }}} 187 194 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).195 This 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). 189 196 190 197 Note 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 ---- 197 202 == Original Note == 198 203