📄 redmon.txt
字号:
You can use Ghostscript with `RedMon` to create a PostScript printer.
To print to a HP DeskJet 500 printer whose queue name is
"HP DeskJet 500", first create a file named
c:\gs\djet500.rsp which contains the following:
-Ic:\gs\gs7.03\lib;c:\gs\fonts
-sDEVICE=djet500
-dNOPAUSE
-dSAFER
-sPAPERSIZE=a4
See the Ghostscript files `Use.htm` and `Install.htm` for
an explanation of these options.
View the printer properties of an existing printer,
select the `Details` tab, then select the `Add Port `button.
Select `Other`, `Redirected Port` then `OK`.
{bml addport1.bmp}
The RedMon `Add Port` dialog will appear. Accept the defaults.
{bml addport2.bmp}
Using the `Add Printer` wizard, create a new printer object for a
PostScript printer.
A suitable one is `Apple LaserWriter II NT`.
Open the printer properties of this new PostScript printer,
select the `Details` tab, then change the
`Print to the following port` field to the RedMon port you created,
which was probably RPT1:
{bml property.bmp}
Select the `Port Settings` button.
The `RPT1 Properties` dialog will appear.
Enter the program name
c:\gs\gs7.03\bin\gswin32c.exe
and the arguments
@c:\gs\djet500.rsp -sOutputFile="%1" -
Make sure you include the space and `dash` at the end of the line.
Failure to do this could result in Ghostscript stalling the
print queue.
Set output to `Copy temporary file to printer` and set printer
to `HP DeskJet 500`.
{bml portset1.bmp}
If you want to see what is written to stdout (i.e. you want to
to look at error messages), see `Log File Properties`.
{bml portset2.bmp}
Press the OK buttons on the `Log File Properties` and
`RPT1 Properties` dialog boxes.
From the printer properties of this PostScript printer,
select the `Details` tab, then select the `Spool Settings` button.
Change the `Spool data format` to `RAW`.
Select `Disable bi-directional support for this printer`
This last change is most important.
{bml spoolset.bmp}
From the printer properties of this PostScript printer,
select the `PostScript` tab. Make sure that `PostScript header`
is `Download header with each print job`.
Select the `Advanced` button to display the
`Advanced PostScript Options`.
`Data format` should be `ASCII data`.
Deselect both `Send CTRL+D before job` and `Send CTRL+D after job`.
Printing to this `Apple LaserWriter II NT` printer will now
print using Ghostscript.
If you share this printer on a network, it will appear as a
PostScript printer to other network clients.
For a list of available Ghostscript printer devices, change
to the Ghostscript directory c:\gs\gs7.03\bin then run
gswin32c -h
If your printer is not listed, have a look at
http://www.cs.wisc.edu/~ghost/doc/printer.htm
to see if one of the existing Ghostscript printer devices
will work with your printer.
3Ghostscript Example for Windows NT 4.0
?Ghostscript Example for Windows NT 4.0
You can use Ghostscript with `RedMon` to create a PostScript printer.
To print to a HP DeskJet 500 printer whose queue name is
"HP DeskJet 500", first create a file named
c:\gs\djet500.rsp which contains the following:
-Ic:\gs\gs7.03\lib;c:\gs\fonts
-sDEVICE=djet500
-dNOPAUSE
-dSAFER
-sPAPERSIZE=a4
See the Ghostscript files `Use.htm` and `Install.htm` for
an explanation of these options.
Start the `Add Printer` Wizard.
On the second page select `Add Port`.
{bml ntaddp1.bmp}
Select `Redirected Port` then `New Port`.
The RedMon `Add Port` dialog will appear.
Accept the defaults.
{bml addport2.bmp}
Press `Close` then `Configure Port`.
The `RPT1 Properties` dialog will appear.
Enter the program name
c:\gs\gs7.03\bin\gswin32c.exe
and the arguments
@c:\gs\djet500.rsp -sOutputFile="%1" -
Make sure you include the space and `dash` at the end of the line.
Failure to do this could result in Ghostscript stalling the
print queue.
Set output to `Copy temporary file to printer` and set printer
to `HP DeskJet 500`.
{bml portset1.bmp}
If you want to see what is written to stdout (i.e. you want to
to look at error messages), see `Log File Properties`.
{bml portset2.bmp}
Press the OK buttons on the `Log File Properties` and
`RPT1 Properties` dialog boxes.
Select the `Apple LaserWriter II NT v47.0` from the
manufacturer and model page of the Add Printer Wizard.
Printing to this `Apple LaserWriter II NT` printer will now
print using Ghostscript.
If you share this printer on a network, it will appear as a
PostScript printer to other network clients.
For a list of available Ghostscript printer devices, change
to the Ghostscript directory c:\gs\gs7.03\bin then run
gswin32c -h
If your printer is not listed, have a look at
http://www.cs.wisc.edu/~ghost/doc/printer.htm
to see if one of the existing Ghostscript printer devices
will work with your printer.
If you want to configure the redirected port later,
open the printer properties, select the `Ports` tab,
then `Configure Ports`.
RedMon requires that bi-directional support be disabled,
but it appears that it can't be enabled.
{bml ntprop.bmp}
3Ghostscript Example with HP LaserJet printer
?Ghostscript Example with HP LaserJet printer
?LaserJet
For the HP LaserJet 4L printer, you need to use the Ghostscript
device ljet4 with resolution set to 300dpi.
c:\gs\ljet4l.rsp would contain:
-Ic:\gs\gs7.03\lib;c:\gs\fonts
-sDEVICE=ljet4
-r300
-dNOPAUSE
-dSAFER
-sPAPERSIZE=a4
The Ghostscript command would be
c:\gs\gs7.03\bin\gswin32c.exe
and the arguments
@c:\gs\ljet4l.rsp -sOutputFile="%1" -
Make sure you include the space and `dash` at the end of the line.
Failure to do this could result in Ghostscript stalling the
print queue.
Output would be
Copy temporary file to printer
and printer
HP LaserJet 4L
All other settings should be the same as the previous example.
3PDF writer
?PDF writer
PostScript written to a RedMon port can be converted to a
PDF file using Ghostscript.
Install a printer driver for a colour PostScript printer, e.g.
`Apple Color LaserWriter 12/600`. If you select a black
and white printer such as `Apple LaserWriter II NT` you will
end up with your colour images becoming greyscale.
To use RedMon and Ghostscript to create a PDF writer, you
need to use the Ghostscript device pdfwrite.
c:\gs\pdfwrite.rsp would contain:
-Ic:\gs\gs7.03\lib;c:\gs\fonts
-sDEVICE=pdfwrite
-r300
-dNOPAUSE
-dSAFER
-sPAPERSIZE=a4
The Ghostscript command would be
c:\gs\gs7.03\bin\gswin32c.exe
and the arguments
@c:\gs\pdfwrite.rsp -sOutputFile="%1" -c .setpdfwrite -f -
Make sure you include the space and `dash` at the end of the line.
Failure to do this could result in Ghostscript stalling the
print queue.
Output should be set to
Prompt for filename
All other settings should be the same as the previous examples.
You may wish to rename the printer from `Apple Color LaserWriter 12/600`
to `Ghostscript PDF writer`.
2Common Problems
?Common Problems
If you have problems, it is recommended that you configure the
RedMon port to use a Log File with debugging turned on.
Before configuring RedMon, make sure that your redirection program
runs correctly from the command line.
`Problem:` When attempting to print, a message box titled `Printers Folder`
appears saying `There was an error writing to RPT1: for the printer
(Apple LaserWriter II NT): The system cannot write to the specified device.`
RedMon couldn't start the program you specified.
Look in the Log File for more details.
Make sure you have disabled bi-directional printer support.
`Problem:` Ghostscript locks up.
You might have forgotten to append a space and dash to the end of
the Ghostscript arguments. This is needed to make Ghostscript read
from standard input.
`Problem:` Ghostscript will process some jobs, but not others.
If you print to FILE:, Ghostscript is able to process these jobs.
Make sure the `Spool Settings` are set to
`Disable bi-directional support for this printer`.
If this is the problem, the log file with debugging turned on will
include the message
REDMON ReadPort: You must disable bi-directional printer support
for this printer.
`Problem:` Attempting to configure a port gives the error message:
"This option is not available or not allowed".
You may need to configure the RedMon port from the computer
running RedMon, rather than a remote computer.
`Problem:` Windows NT lpd treats data as text instead of raw.
This isn't a problem with RedMon, but you might just need this
information. When printing from Unix to NT, two common methods
are to use Samba to write to a RedMon port, or to use lpr to write to
the lpd service on NT. The lpd service is not installed by default.
Windows NT lpd sometimes decides to treat the incoming stream as text
rather than raw, causing the PostScript code to be printed instead
of being interpreted. This can be fixed with an appropriate command
option for lpr at the remote Unix box, or at the Windows NT end with
regedit, see:
http://www.jsiinc.com/TIP0400/rh0473.htm
Edit the registry and search for:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LPDSVC\Parameters
Add Value name SimulatePassThrough of type REG_DWORD and set it to 1.
2Copyright
?Copyright
Copyright (C) 1997-2000, Ghostgum Software Pty Ltd. All rights reserved.
This file is part of RedMon.
This program is distributed with NO WARRANTY OF ANY KIND. No author
or distributor accepts any responsibility for the consequences of using it,
or for whether it serves any particular purpose or works at all, unless he
or she says so in writing. Refer to the RedMon Free Public Licence
(the "Licence") for full details.
Every copy of RedMon must include a copy of the Licence, normally in a
plain ASCII text file named LICENCE. The Licence grants you the right
to copy, modify and redistribute RedMon, but only under certain conditions
described in the Licence. Among other things, the Licence requires that
the copyright notice and this notice be preserved on all copies.
Author: Russell Lang, Ghostgum Software Pty Ltd.
Internet: http://www.ghostgum.com.au/
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -