home *** CD-ROM | disk | FTP | other *** search
- CONFIGURE PSF FOR AN "UNKNOWN" PRINTER
-
- Psf likes to have a "printer definition file" (usually
- psfprint.def) to describe the fonts, imageable area, and paper
- tray information needed by psf. If the .def information
- is an accurate description of your printer, psf can do a
- good job of page rotation, scaling, and double sided printing.
-
- Two way are available to create a .def for an unknown printer:
-
-
- GET A COPY OF YOUR PRINTER'S .PPD FILE
- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
- If you can get a copy of your printer's ".ppd" file from the
- Adobe server by email or from the manufacturer, you can use the
- "table" programme to convert the .ppd information into a .def
- format required by psf. The command:
-
- table printer.ppd /usr/tmp
-
- will read your file "printer.ppd" and create a file
- /usr/tmp/printer.def. Copy this "printer.def" file to your psf
- directory:
-
- cp /usr/tmp/printer.def psfprint.def
-
- Also, you should probably copy this file into ./defs for future
- reference.
-
-
- BUILD A .DEF FILE MANUALLY
- ^^^^^^^^^^^^^^^^^^^^^^^^^^
- If you have a printer that is not described when you execute
-
- selectdef ./defs/*.def
-
- all is not lost.
-
- Here is a summary of the steps:
-
- 1. copy getsizes.ps to your printer. This determines
- the page sizes and imageable area on your printer.
-
- 2. copy ./defs/n890_470.def to psfprint.def.
-
- 3. edit psfprint.def to reflect the imageable area
- and font name information for your printer.
-
- 4. all done - continue with "make installbsd"
- or "make installsysv" as described in "Install.unix".
-
- In more detail:
-
- Generally, your printer is closely approximated by one of the
- known printers. Guess at which one that might be! The best
- guessing method is to look at your printer characteristics and
- compare them to the various files in the ./defs directory :-)
-
- If you are really lost, then maybe psf's default printer (a NEC
- LC890) is close enough to yours and you don't really need a
- psfprint.def description file.
-
- With a little work, you can manually construct your own
- psfprint.def. The basic items that you need to know are:
-
- 1. Which paper sizes can your printer handle
- such as a4, letter, legal, etc? This can be
- generated by "getsizes.ps".
-
- What is the postscript command needed to select
- the paper size? Check you reference manual.
-
- 2. What is the imageable area of each paper size?
- Each paper size has a specific x-y min and max that
- can be addressed. The postscript programme
- "getsizes.ps" can give you the imageable areas
- for your printer.
-
- 3. Which fonts are available? Usually, you can
- have the printer display all of it's known
- fonts when you print the printers "test page".
- Maybe it is in your manual.
-
- 4. How many paper trays are on your system and how
- do you select them? This is usually in your
- printer's technical reference manual.
-
- Determine the various available fonts from your printer's manual
- or the built-in test page.
-
- Send the postscript programme "getsizes.ps" to your printer.
- It will attempt to display the imageable area for all paper
- sizes in your printer. Copy with a command like:
-
- 1. lp getsizes.ps
-
- 2. cat getsizes.ps > /dev/lp
-
- 3. or what ever, just get it to the printer.
-
- The resulting printed sizes are needed when you construct your
- own psfprint.def file. The numbers that display are exactly
- those required when you describe the "page dimensions" in the
- .def file.
-
- Now copy a sample ".def" file to your working copy. Try to choose
- one that might be an approximation to your own printer:
-
- cp ./defs/n890_470.def psfprint.def
-
- Using the example commented sample "def" file below, edit your
- psfprint.def file to use your printer's appropriate information
- for imageable area, font names and other parameters. Hopefully,
- it is clear enough and you can just follow your intuition!
-
- =========================================================================
-
- This is a commented sample of a printer "def" file.
-
- You will need a list of available fonts and the printed results
- from "getsizes.ps". Select a .def that is a "reasonable
- approximation" to your printer. If you cannot find one,
- use ./defs/n890_470.def.
-
- Look at other files in the ./defs directory to see how things
- should be constructed. For example, if you have only one paper
- tray, then you don't need "*slots" entries. i.e. your resulting
- file would look like:
- ...
- *slots 0
- *eof
-
- The various sections of the file are separated by a line
- starting with "*". The first section describes the page sizes
- known to the printer.
-
- There should not be any blank lines in your resulting .def
- file. Line format must be exactly right. No edit checks
- are performed by psf and friends.
- --...--
-
- # comments at beginning of file
- *psflpd <link> <opt> <opt> <comment> <-- option marker for lpd use only
- (see Install.lpd for details)
- This is not present for use with
- lp/lpsched. Multiple lines
- may be present.
-
- *printer <-- marker: printer definition
- NEC LC-890 v47.0 (modified) <-- printer name for selectdef
-
- *paper 4 <-- marker and count of paper
- types.
-
- next comes each paper size
- available in your printer
- in groups of three lines.
-
- Letter <-- The name use by psf when the
- user selects a size with -g:
- e.g. psf -g letter my.fil
- ^^^^^^^^^
- statusdict begin lettertray end <-- actual postscript to select size
- code needed to select this
- page size. If there is only
- one paper tray, this is
- usually a single word like
- "letter" as in the file
- ./defs/apple380.def or for
- the Varityper printers.
- Examine a few of these files
- for the syntax of this line.
-
- the following is the imageable
- area for the paper size. Use
- the numbers that are printed
- when you copy getsizes.ps or
- psizes.ps to your printer.
- 612 792 18 15 599 776
- | | | | | +--------- upper right y-coord (points)
- | | | | +--------------- upper right x-coord
- | | | +-------------------- lower left y-coord
- | | +-------------------------- lower left x-coord
- | +--------------------------------- total page height in points
- +--------------------------------------- total page width in points
- (at least one blank must
- separate the numbers)
-
- The first two numbers are
- manually calculated in points
- such that:
-
- points = 72 * inches
-
- for example, a 8.5 inch wide
- page would be 612 points wide.
-
- Legal <-+-- the above is repeated for
- statusdict begin legaltray end | each page size known
- 612 1008 18 19 593 990 <-+-- to the printer
- A4
- statusdict begin a4tray end
- 595 842 10 8 585 813
- B5
- statusdict begin b5tray end
- 516 729 18 7 482 702
-
- *order 1 <-- marker and count for stacking order
- Normal <-- either "Normal" if the pages are
- stacked face down, or
- "Reverse" if the pages are
- stacked face up.
-
- *fonts 10 <-- marker and count for fonts
- AvantGarde-Book <-- real font names in your printer
- Bookman-Light
- Courier
- Helvetica fonts available on your printer
- Helvetica-Narrow are printed on it's test page
- NewCenturySchlbk-Roman
- Palatino-Roman only the "base font name", not
- Garamond-Light the "italic" or "Bold" names
- Times-Roman are in this list.
- ZapfChancery-MediumItalic
-
- If you wish, modify psf.c
- (array *fonts[NFONTS]) for
- additional or different fonts
-
- *slots 2 <-- marker and count for paper trays
-
- Some printers number the
- paper trays starting from 0
- rather than 1 - for example,
- the Dataproducts or TI printers.
-
- If you have only one paper tray,
- this section should be empty.
-
- statusdict begin 1 setpapertray end <-- how to select first tray
- statusdict begin 2 setpapertray end <-- how to select second tray etc..
- *eof <-- logical eof for printer definition
-
- %%PsfStart <-- marker for language translation
- %%fonX facilities. See language.PSF.
- %%translate This section is optional.
- %%PsfEnd
- %postscript source
- --------------------------------------------------------------------------
- Tony Field: tony@ajfcal.cuc.ab.ca
-