home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / misc / volume27 / psf3 / part06 / Install.def next >
Encoding:
Text File  |  1992-01-20  |  8.6 KB  |  251 lines

  1.         CONFIGURE PSF FOR AN "UNKNOWN" PRINTER
  2.  
  3.     Psf likes to have a "printer definition file" (usually
  4.     psfprint.def) to describe the fonts, imageable area, and paper
  5.     tray information needed by psf.  If the .def information
  6.     is an accurate description of your printer, psf can do a
  7.     good job of page rotation, scaling, and double sided printing.
  8.     
  9.     Two way are available to create a .def for an unknown printer:
  10.  
  11.  
  12.     GET A COPY OF YOUR PRINTER'S .PPD FILE
  13.     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  14.     If you can get a copy of your printer's ".ppd" file from the
  15.     Adobe server by email or from the manufacturer, you can use the
  16.     "table" programme to convert the .ppd information into a .def
  17.     format required by psf. The command:
  18.  
  19.         table printer.ppd /usr/tmp
  20.  
  21.     will read your file "printer.ppd" and create a file
  22.     /usr/tmp/printer.def. Copy this "printer.def" file to your psf
  23.     directory:
  24.  
  25.         cp /usr/tmp/printer.def psfprint.def
  26.  
  27.     Also, you should probably copy this file into ./defs for future
  28.     reference.
  29.  
  30.  
  31.     BUILD A .DEF FILE MANUALLY
  32.     ^^^^^^^^^^^^^^^^^^^^^^^^^^
  33.     If you have a printer that is not described when you execute
  34.  
  35.         selectdef ./defs/*.def
  36.  
  37.     all is not lost. 
  38.  
  39.     Here is a summary of the steps:
  40.     
  41.         1. copy getsizes.ps to your printer. This determines
  42.            the page sizes and imageable area on your printer.
  43.         
  44.         2. copy ./defs/n890_470.def to psfprint.def.
  45.         
  46.         3. edit psfprint.def to reflect the imageable area
  47.            and font name information for your printer.
  48.         
  49.         4. all done - continue with "make installbsd"
  50.            or "make installsysv" as described in "Install.unix".
  51.  
  52.     In more detail:
  53.     
  54.     Generally, your printer is closely approximated by one of the
  55.     known printers. Guess at which one that might be! The best
  56.     guessing method is to look at your printer characteristics and
  57.     compare them to the various files in the ./defs directory :-)
  58.  
  59.     If you are really lost, then maybe psf's default printer (a NEC
  60.     LC890) is close enough to yours and you don't really need a
  61.     psfprint.def description file.
  62.  
  63.     With a little work, you can manually construct your own
  64.     psfprint.def. The basic items that you need to know are:
  65.  
  66.         1. Which paper sizes can your printer handle
  67.            such as a4, letter, legal, etc?  This can be
  68.            generated by "getsizes.ps".
  69.            
  70.            What is the postscript command needed to select
  71.            the paper size? Check you reference manual.
  72.  
  73.         2. What is the imageable area of each paper size?
  74.            Each paper size has a specific x-y min and max that
  75.            can be addressed. The postscript programme
  76.            "getsizes.ps" can give you the imageable areas
  77.            for your printer.
  78.  
  79.         3. Which fonts are available? Usually, you can
  80.            have the printer display all of it's known
  81.            fonts when you print the printers "test page".
  82.            Maybe it is in your manual.
  83.  
  84.         4. How many paper trays are on your system and how
  85.            do you select them?  This is usually in your
  86.            printer's technical reference manual.
  87.  
  88.     Determine the various available fonts from your printer's manual
  89.     or the built-in test page.
  90.  
  91.     Send the postscript programme "getsizes.ps" to your printer.
  92.     It will attempt to display the imageable area for all paper
  93.     sizes in your printer.  Copy with a command like:
  94.  
  95.         1.   lp getsizes.ps
  96.         
  97.         2.   cat getsizes.ps > /dev/lp
  98.         
  99.         3.   or what ever, just get it to the printer.
  100.  
  101.     The resulting printed sizes are needed when you construct your
  102.     own psfprint.def file. The numbers that display are exactly
  103.     those required when you describe the "page dimensions" in the
  104.     .def file.
  105.  
  106.     Now copy a sample ".def" file to your working copy. Try to choose
  107.     one that might be an approximation to your own printer:
  108.  
  109.         cp ./defs/n890_470.def psfprint.def
  110.     
  111.     Using the example commented sample "def" file below, edit your
  112.     psfprint.def file to use your printer's appropriate information
  113.     for imageable area, font names and other parameters. Hopefully,
  114.     it is clear enough and you can just follow your intuition!
  115.  
  116. =========================================================================        
  117.  
  118.     This is a commented sample of a printer "def" file.
  119.  
  120.     You will need a list of available fonts and the printed results
  121.     from "getsizes.ps".  Select a .def that is a "reasonable
  122.     approximation" to your printer.  If you cannot find one,
  123.     use ./defs/n890_470.def.
  124.  
  125.     Look at other files in the ./defs directory to see how things
  126.     should be constructed. For example, if you have only one paper
  127.     tray, then you don't need "*slots" entries. i.e. your resulting
  128.     file would look like:
  129.         ...
  130.         *slots 0
  131.         *eof
  132.  
  133.     The various sections of the file are separated by a line
  134.     starting with "*". The first section describes the page sizes
  135.     known to the printer.
  136.  
  137.     There should not be any blank lines in your resulting .def
  138.     file.  Line format must be exactly right. No edit checks
  139.     are performed by psf and friends.
  140. --...--
  141.  
  142. # comments at beginning of file
  143. *psflpd    <link> <opt> <opt> <comment>     <-- option marker for lpd use only
  144.                         (see Install.lpd for details)
  145.                         This is not present for use with
  146.                         lp/lpsched. Multiple lines
  147.                         may be present.
  148.  
  149. *printer                <-- marker: printer definition
  150. NEC LC-890 v47.0 (modified)             <-- printer name for selectdef
  151.  
  152. *paper 4                <-- marker and count of paper
  153.                         types.
  154.                         
  155.                         next comes each paper size
  156.                         available in your printer
  157.                         in groups of three lines.
  158.  
  159. Letter                                  <-- The name use by psf when the
  160.                         user selects a size with -g:
  161.                             e.g.  psf -g letter my.fil
  162.                               ^^^^^^^^^
  163. statusdict begin lettertray end         <-- actual postscript to select size
  164.                         code needed to select this
  165.                         page size. If there is only
  166.                         one paper tray, this is
  167.                         usually a single word like
  168.                         "letter" as in the file
  169.                         ./defs/apple380.def or for
  170.                         the Varityper printers.
  171.                         Examine a few of these files
  172.                         for the syntax of this line.
  173.  
  174.                         the following is the imageable
  175.                         area for the paper size.  Use
  176.                         the numbers that are printed
  177.                         when you copy getsizes.ps or
  178.                         psizes.ps to your printer.
  179.   612   792    18    15   599   776
  180.    |     |      |     |    |     +--------- upper right y-coord (points)
  181.    |     |      |     |    +--------------- upper right x-coord
  182.    |     |      |     +-------------------- lower left y-coord
  183.    |     |      +-------------------------- lower left x-coord
  184.    |     +--------------------------------- total page height in points
  185.    +--------------------------------------- total page width in points
  186.                         (at least one blank must 
  187.                          separate the numbers)
  188.  
  189.                         The first two numbers are
  190.                         manually calculated in points
  191.                         such that:
  192.                         
  193.                           points = 72 * inches
  194.                         
  195.                         for example, a 8.5 inch wide
  196.                         page would be 612 points wide.
  197.  
  198. Legal                                   <-+-- the above is repeated for
  199. statusdict begin legaltray end            |   each page size known
  200.   612  1008    18    19   593   990     <-+-- to the printer
  201. A4
  202. statusdict begin a4tray end
  203.   595   842    10     8   585   813
  204. B5
  205. statusdict begin b5tray end
  206.   516   729    18     7   482   702
  207.  
  208. *order 1                <-- marker and count for stacking order
  209. Normal                    <-- either "Normal" if the pages are
  210.                         stacked face down, or
  211.                         "Reverse" if the pages are
  212.                         stacked face up.
  213.                         
  214. *fonts 10                               <-- marker and count for fonts
  215. AvantGarde-Book                         <-- real font names in your printer
  216. Bookman-Light
  217. Courier                      
  218. Helvetica                    fonts available on your printer
  219. Helvetica-Narrow                are printed on it's test page
  220. NewCenturySchlbk-Roman
  221. Palatino-Roman                    only the "base font name", not
  222. Garamond-Light                    the "italic" or "Bold" names
  223. Times-Roman                        are in this list.
  224. ZapfChancery-MediumItalic
  225.  
  226.                         If you wish, modify psf.c
  227.                         (array *fonts[NFONTS]) for
  228.                         additional or different fonts
  229.  
  230. *slots 2                                <-- marker and count for paper trays
  231.  
  232.                         Some printers number the
  233.                         paper trays starting from 0
  234.                         rather than 1 - for example,
  235.                         the Dataproducts or TI printers.
  236.                         
  237.                         If you have only one paper tray,
  238.                         this section should be empty.
  239.                      
  240. statusdict begin 1 setpapertray end     <-- how to select first tray
  241. statusdict begin 2 setpapertray end     <-- how to select second tray  etc..
  242. *eof                                    <-- logical eof for printer definition
  243.  
  244. %%PsfStart                <-- marker for language translation
  245. %%fonX                        facilities.  See language.PSF.
  246. %%translate                    This section is optional.
  247. %%PsfEnd
  248. %postscript source
  249. --------------------------------------------------------------------------
  250. Tony Field:  tony@ajfcal.cuc.ab.ca
  251.