home *** CD-ROM | disk | FTP | other *** search
/ DP Tool Club 19 / CD_ASCQ_19_010295.iso / vrac / pslwgs15.zip / PSLWGS.DOC < prev    next >
Text File  |  1994-12-10  |  7KB  |  145 lines

  1.     The other files in this ZIP (PSLWGRAY.PSF, PSLWRGB.PSF, and
  2. PSLWCMYK.PSF) contain version 1.4 of some PostScript code that allows
  3. control over minimum line width and output color or gray level, on a
  4. color-by-color basis, for PostScript output using the AutoCAD Release
  5. 12 PSOUT command.  The code has been tested on an NEC Silentwriter
  6. 90, an Agfa 2400 dpi PostScript printer, the Ghostscript interpreter
  7. version 2.61, and Freedom of Press Classic 4.0 printing to an HP
  8. Deskjet 500c.  Using the code in this package requires AutoCAD
  9. Release 12 (or higher).
  10.     All three files define a minimum line width in inches for each
  11. AutoCAD color. Entities with explicit widths (for example, plines)
  12. that are greater than the minimum for that color will be printed with
  13. their explicit width (this assumes interpreting AutoCAD drawing units
  14. as inches).  In rare cases some lines may be wider than desired (when
  15. the AutoCAD PSOUT command temporarily makes the X and Y axes have
  16. unequal scales).
  17.     Each file defines a "printed" color for each AutoCAD color, but
  18. each file does it in a different way and with different capabilities
  19. and limitations.  PSLWGRAY produces monochrome output, black or white
  20. or shades of gray.  PSLWRGB produces color output, specifying colors
  21. as combinations of the primaries RGB (Red-Green-Blue).  PSLWCMYK
  22. produces color output, specifying colors as combinations of the
  23. primaries CMYK (Cyan-Magenta-Yellow-blacK).  Note that the CMYK color
  24. model is a PostScript level 2 feature, and may or may not be
  25. supported by any particular PostScript level 1 device.
  26.     Due to limitations in the way AutoCAD handles the PSOUT command
  27. and the PSPROLOG system variable, it's not particulary convenient to
  28. change line widths and colors or gray scales.  I hope this will
  29. improve in the future.  For now, you must edit either ACAD.PSF or
  30. each individual .EPS file produced by PSOUT to change the line widths
  31. or colors or gray scales.  Changes in ACAD.PSF affect all files
  32. produced by PSOUT after the change; changes in an .EPS file produced
  33. by PSOUT affect only that file.
  34.     Currently, PSLWGS only supports portrait output.  This means
  35. that lines that are vertical on the AutoCAD screen will be parallel
  36. to the long edge of the paper when printed.  If you're doing PSOUT to
  37. import to another program and need another orientation, the program
  38. into which you're importing the .EPS file may be able to rotate it.
  39.  
  40.     To use this file:
  41.  
  42. I.  Initial setup:
  43.  
  44.     A.  Locate the file ACAD.PSF.  It's probably in the SUPPORT 
  45.         subdirectory of your AutoCAD directory.
  46.     B.  Use an ASCII text editor to insert any (or all) of the three
  47.         .PSF files in this package, at the end of ACAD.PSF.  (ACAD.PSF
  48.         is covered in the Release 12 "Customization Manual" on pages
  49.         228-232).
  50.     C.  If you will normally use line widths other than 0.001" (note
  51.         that a 300 dpi printer does line widths in units of 0.0033"),
  52.         change the values in LGP_colortowidth (see step C, below) to
  53.         be your most common linewidth settings.
  54.  
  55. II.  Using one of the prologs
  56.  
  57.     A.  In the AutoCAD drawing editor, set the PSPROLOG system
  58.         variable to contain "ps_lw_gs" (for gray scale output) or
  59.         "ps_lw_rgb" (for RGB output) or "ps_lw_cmyk" (for CMYK output).
  60.         NOTE THAT THIS IS CASE SENSITIVE!  For example, you can set up
  61.         for gray scale output by typing:
  62.  
  63.               psprolog ps_lw_gs<Enter>
  64.  
  65.         (Note that PSPROLOG is saved in ACAD.CFG and not with the
  66.         drawing.  This means that this setting will apply to all
  67.         your drawings until you change it).
  68.  
  69.     B.  Perform a PSOUT command.
  70.  
  71.     C.  If you want to change the line widths from the defaults
  72.         (0.001" if you haven't changed them), use an ASCII text
  73.         editor to edit the resulting .EPS file. Near the beginning
  74.         of the file you'll find:
  75.  
  76.          /LGP_colortowidth
  77.            [
  78.              0.001          % Color 1 (red)
  79.              0.001          % Color 2 (yellow)
  80.              0.001          % Color 3 (green)
  81.              0.001          % Color 4 (cyan)
  82.              0.001          % Color 5 (blue)
  83.              0.001          % Color 6 (magenta)
  84.              0.001          % Color 7 (white)
  85.              0.001          % Color 8
  86.              0.001          % Color 9
  87.              0.001          % Color 10
  88.              0.001          % Color 11
  89.              0.001          % Color 12
  90.              0.001          % Color 13
  91.              0.001          % Color 14
  92.              0.001          % Color 15
  93.            ] def
  94.  
  95.          Change the numbers as desired.  The units are inches. Note
  96.          that on a 300 dpi printer, the minimum line width is 0.003333
  97.          inches; any specified line width that's less than that will
  98.          come out as 0.003333 inches.
  99.  
  100.     D.  If you want to change the colors or gray scales from the defaults
  101.         (all black for monochrome output, or the same as the standard
  102.         AutoCAD color [in 16 color mode] for color output), look just
  103.         below the line width section.
  104.  
  105.         You'll find some comments (indicated by a "%" sign) explaining
  106.         the meaning of the numbers for the particular color model being
  107.         used, and the definition of the mapping array.
  108.  
  109.         Change the numbers in the "LGP_ACADcolortoPScolor" array as
  110.         appropriate, and as explained in the comments preceding the
  111.         array.
  112.  
  113.     E.  Save the file and copy it to your output device.
  114.  
  115.  
  116. Jon Fleming
  117.  
  118. CIS:     70334,2443
  119.  
  120.  
  121. REVISION HISTORY:
  122.  
  123. 1.0 Initial release
  124. 1.1 Fixed bug of leaving an object on the stack after the entire
  125.     procedure finished
  126. 1.2 (13 Jul 93) Fixed bug of desired line width not saved and
  127.     restored with graphics state.  This manifested as "persistent
  128.     polyline widths"; when a polyline with explicit width greater
  129.     than the minimum was printed, all subsequent strokes were at the
  130.     same width as the polyline until a color change or another
  131.     polyline came along.
  132. 1.3 (11 Oct 93)  Added RGB and CMYK color capability.  Note that the
  133.     three files are identical except in the definitions of the
  134.     "LGP_ACADcolortoPScolor" array and the "LGP_setcolor" procedure.
  135.     Added semicolons to the front of most comments and blank lines
  136.     so they won't show up in the final EPS file.
  137. 1.4 (20 Aug 94)  Added the UserPrologDict private dictionary and the
  138.     LGP_Version entry in that dictionary.  This put PSLWGS into better
  139.     conformance with recommendations for EPS files, and (for some
  140.     reason I don't understand) allows Autodesk's AIlogo PSFILL to work
  141.     in a file that contains a PSLWGS prolog.
  142. 1.5 (10 Dec 94) Added a check for a zero scale factor, which AutoCAD
  143.     sets up occasionally.  Without this check EPS files would (rarely)
  144.     fail with a divide-by-zero error.
  145.