home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
DP Tool Club 19
/
CD_ASCQ_19_010295.iso
/
vrac
/
pslwgs15.zip
/
PSLWGS.DOC
< prev
next >
Wrap
Text File
|
1994-12-10
|
7KB
|
145 lines
The other files in this ZIP (PSLWGRAY.PSF, PSLWRGB.PSF, and
PSLWCMYK.PSF) contain version 1.4 of some PostScript code that allows
control over minimum line width and output color or gray level, on a
color-by-color basis, for PostScript output using the AutoCAD Release
12 PSOUT command. The code has been tested on an NEC Silentwriter
90, an Agfa 2400 dpi PostScript printer, the Ghostscript interpreter
version 2.61, and Freedom of Press Classic 4.0 printing to an HP
Deskjet 500c. Using the code in this package requires AutoCAD
Release 12 (or higher).
All three files define a minimum line width in inches for each
AutoCAD color. Entities with explicit widths (for example, plines)
that are greater than the minimum for that color will be printed with
their explicit width (this assumes interpreting AutoCAD drawing units
as inches). In rare cases some lines may be wider than desired (when
the AutoCAD PSOUT command temporarily makes the X and Y axes have
unequal scales).
Each file defines a "printed" color for each AutoCAD color, but
each file does it in a different way and with different capabilities
and limitations. PSLWGRAY produces monochrome output, black or white
or shades of gray. PSLWRGB produces color output, specifying colors
as combinations of the primaries RGB (Red-Green-Blue). PSLWCMYK
produces color output, specifying colors as combinations of the
primaries CMYK (Cyan-Magenta-Yellow-blacK). Note that the CMYK color
model is a PostScript level 2 feature, and may or may not be
supported by any particular PostScript level 1 device.
Due to limitations in the way AutoCAD handles the PSOUT command
and the PSPROLOG system variable, it's not particulary convenient to
change line widths and colors or gray scales. I hope this will
improve in the future. For now, you must edit either ACAD.PSF or
each individual .EPS file produced by PSOUT to change the line widths
or colors or gray scales. Changes in ACAD.PSF affect all files
produced by PSOUT after the change; changes in an .EPS file produced
by PSOUT affect only that file.
Currently, PSLWGS only supports portrait output. This means
that lines that are vertical on the AutoCAD screen will be parallel
to the long edge of the paper when printed. If you're doing PSOUT to
import to another program and need another orientation, the program
into which you're importing the .EPS file may be able to rotate it.
To use this file:
I. Initial setup:
A. Locate the file ACAD.PSF. It's probably in the SUPPORT
subdirectory of your AutoCAD directory.
B. Use an ASCII text editor to insert any (or all) of the three
.PSF files in this package, at the end of ACAD.PSF. (ACAD.PSF
is covered in the Release 12 "Customization Manual" on pages
228-232).
C. If you will normally use line widths other than 0.001" (note
that a 300 dpi printer does line widths in units of 0.0033"),
change the values in LGP_colortowidth (see step C, below) to
be your most common linewidth settings.
II. Using one of the prologs
A. In the AutoCAD drawing editor, set the PSPROLOG system
variable to contain "ps_lw_gs" (for gray scale output) or
"ps_lw_rgb" (for RGB output) or "ps_lw_cmyk" (for CMYK output).
NOTE THAT THIS IS CASE SENSITIVE! For example, you can set up
for gray scale output by typing:
psprolog ps_lw_gs<Enter>
(Note that PSPROLOG is saved in ACAD.CFG and not with the
drawing. This means that this setting will apply to all
your drawings until you change it).
B. Perform a PSOUT command.
C. If you want to change the line widths from the defaults
(0.001" if you haven't changed them), use an ASCII text
editor to edit the resulting .EPS file. Near the beginning
of the file you'll find:
/LGP_colortowidth
[
0.001 % Color 1 (red)
0.001 % Color 2 (yellow)
0.001 % Color 3 (green)
0.001 % Color 4 (cyan)
0.001 % Color 5 (blue)
0.001 % Color 6 (magenta)
0.001 % Color 7 (white)
0.001 % Color 8
0.001 % Color 9
0.001 % Color 10
0.001 % Color 11
0.001 % Color 12
0.001 % Color 13
0.001 % Color 14
0.001 % Color 15
] def
Change the numbers as desired. The units are inches. Note
that on a 300 dpi printer, the minimum line width is 0.003333
inches; any specified line width that's less than that will
come out as 0.003333 inches.
D. If you want to change the colors or gray scales from the defaults
(all black for monochrome output, or the same as the standard
AutoCAD color [in 16 color mode] for color output), look just
below the line width section.
You'll find some comments (indicated by a "%" sign) explaining
the meaning of the numbers for the particular color model being
used, and the definition of the mapping array.
Change the numbers in the "LGP_ACADcolortoPScolor" array as
appropriate, and as explained in the comments preceding the
array.
E. Save the file and copy it to your output device.
Jon Fleming
CIS: 70334,2443
REVISION HISTORY:
1.0 Initial release
1.1 Fixed bug of leaving an object on the stack after the entire
procedure finished
1.2 (13 Jul 93) Fixed bug of desired line width not saved and
restored with graphics state. This manifested as "persistent
polyline widths"; when a polyline with explicit width greater
than the minimum was printed, all subsequent strokes were at the
same width as the polyline until a color change or another
polyline came along.
1.3 (11 Oct 93) Added RGB and CMYK color capability. Note that the
three files are identical except in the definitions of the
"LGP_ACADcolortoPScolor" array and the "LGP_setcolor" procedure.
Added semicolons to the front of most comments and blank lines
so they won't show up in the final EPS file.
1.4 (20 Aug 94) Added the UserPrologDict private dictionary and the
LGP_Version entry in that dictionary. This put PSLWGS into better
conformance with recommendations for EPS files, and (for some
reason I don't understand) allows Autodesk's AIlogo PSFILL to work
in a file that contains a PSLWGS prolog.
1.5 (10 Dec 94) Added a check for a zero scale factor, which AutoCAD
sets up occasionally. Without this check EPS files would (rarely)
fail with a divide-by-zero error.