home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Professional / OS2PRO194.ISO / os2 / print / lp3820 / lp3820.doc < prev    next >
Text File  |  1993-05-27  |  58KB  |  1,394 lines

  1.  
  2. lp3820 - Print AFP documents on a personal laser printer
  3.          (C) Copyright IBM Corp, 1990, 1993
  4.  
  5.          Ken Borgendale  -  IBM Boca Raton
  6.  
  7.          Version 2.3a -  27 May 1992
  8.  
  9.  
  10. License
  11. =======
  12.  
  13. This tool is offered "asis" without any claim of suitability and
  14. without any warranties.  Use and distribution is governed by the
  15. license which is included in the file LICENSE.TXT.
  16.  
  17. Release Notes
  18. =============
  19.  
  20. Version 2.3 has significant improvement in PCL5 (HP LaserJet III,
  21. HP LaserJet 4, and IBM LaserPrinter 4039) support.  There is also
  22. new support for hardware duplex and some bug fixes.  There are no
  23. changes to the raster font package (LP382F).
  24.  
  25. Introduction
  26. ============
  27.  
  28. Most of the IBM print documents available on the IBM mainframe systems
  29. are in the AFP (Advanced Function Print) format, designed to be
  30. printed on the 3820, 3800-3, 3812, and all of their successor
  31. products.  These files have file types such as LIST3820, LIST38PP,
  32. PSEG3820 and OVLY3820.  Most of these documents are created by DCF
  33. (Script, BookMaster), but they are also created by other products such
  34. as GDDM and DisplayWrite/370.  The printers which print these
  35. documents are large shared printers attached to the host.  The
  36. direction today is toward small, personal laser printers attached to
  37. PCs.  These printers are supported by word processing packages on the
  38. PC, but are unable to print host documents.  The lp3820 package
  39. attempts to bridge this gap by allowing most AFP documents to be
  40. printed on a personal laser printer.  lp3820 can be used to print
  41. draft copies, or to print distributed documents.
  42.  
  43. Some documents will not print correctly, and the font appearance and
  44. spacing differ from the AFP fonts.  lp3820 is a datastream converter.
  45. It takes in an AFP file, and puts out a personal printer datastream.
  46. It is not designed to help you move your data between the host and the
  47. PC (either the input or output datastreams).  This document contains a
  48. description of how to install and use the lp3820 package.
  49.  
  50. The following formats of AFP documents are supported:
  51.     ■ LIST3820 - Document for the 3820 and most other AFP printers
  52.     ■ LIST38PP - Document for the 3800 mod 3 and 6
  53.     ■ LIST4028 - Document for the 4028 (300 dpi)
  54.     ■ LIST4250 - Document for the 4250 (600 dpi)
  55.     ■ LISTAPA  - 3812 or 3816 document
  56.     ■ OVLY3820 - Overlay for the 3820
  57.     ■ PSEG3820 - Page segment for the 3820
  58.     ■ PSEG38PP - Page segment for the 3800-3
  59.  
  60. Page segments and Overlays are treated as one page documents.
  61.  
  62. lp3820 deals with personal laser printers in three modes:
  63.  
  64. 1. PPDS - Personal Printer Datastream (native mode on the IBM
  65.    LaserPrinter 4019 and 4029).  There are variations of this for the
  66.    4019 and 4029.
  67.  
  68. 2. HPPCL - HP Printer Command Language (native mode of the HP
  69.    LaserJet series, and emulated on most other personal laser printers).
  70.    - PCL4 for the HP LaserJet II and compatibles
  71.    - PCL5 for the HP LaserJet III, IBM 4039, and compatibles
  72.    - PCL5 extended for the HP LaserJet 4
  73.    Printers before the LaserJet II are not supported, but they may
  74.    work with some restrictions.
  75.  
  76. 3. PostScript - Adobe printer language (used in a large number of high
  77.    end personal printers, and available for the IBM LaserPrinter).
  78.  
  79. In addition to these printers, lp3820 will also allow the text of an
  80. AFP file into a flat file.  This can be used to extract the text from
  81. a print file, or to view the contents on the display.
  82.  
  83. Note:  Mixed orientation pages (such as rotated tables) are not
  84. supported on 4019 and HP PCL4 printers. Multi-up capabilities are only
  85. supported in PostScript.
  86.  
  87. In order to print text within the AFP documents, lp3820 provides a
  88. large set of soft fonts.  lp3820 can use the resident fonts (but they
  89. must be declared).  lp3820 uses soft fonts in either PPDS or HPPCL
  90. mode, and converts as necessary for the printer.  The soft fonts
  91. shipped with lp3820 are in PPDS mode, but are converted to HPPCL or
  92. Postscript mode as necessary when printing.  Any PPDS or HP-PCL4 soft
  93. fonts can be used.
  94.  
  95. lp3820 downloads PostScript fonts in either ASCII (.pfa) or binary
  96. (.pfb) to either a PostScript or 4029 printer.  lp3820 provides
  97. PostScript type 3 soft fonts for the IBM logo and extended typographic
  98. fonts.
  99.  
  100.  
  101. Getting Started
  102. ===============
  103.  
  104. If you are an expert user who does not read documentation, all you
  105. have to do in unzip lp3820 (and optional font package), extract the
  106. fonts, and make sure everything is in the path.  Since you are reading
  107. this document, you probably want that in just a bit more detail, so
  108. read on.
  109.  
  110. You will need the following to run lp3820.
  111.  
  112. 1. An IBM PS/2 (or reasonable facsimile) running OS/2 (any version)
  113.    or DOS (3.3 and above) on at least a i286 processor and 400Kb
  114.    free memory.
  115. 2. A laser printer. Just about any kind will do, but it must be an IBM
  116.    LaserPrinter, emulate HPPCL, or run PostScript.  If your printer does
  117.    several of these, you can use it any way you like.  You can use the
  118.    TEXT conversion without the laser printer.
  119. 3. Disk space (you will need extra during install)
  120.    4029 PPDS or PostScript  500K
  121.    4019 PPDS or HPPCL      1800K
  122. 4. LP3820.ZIP
  123. 5. If you are running an IBM LaserPrinter 4019 in PPDS mode, or a
  124.    printer in HP mode before the LaserJet 4, you will also need the
  125.    softfont package LP382F.ZIP.  You can use your own soft fonts
  126.    instead.  Any PPDS or HP-PCL fonts will work, but you must create
  127.    font declarations for them in place of the "include !stdfont" line
  128.    in the profile.
  129. 7. Some AFP files to print. The package is very dull if you do not
  130.    have anything to print.
  131.  
  132.  
  133. Installing lp3820
  134. =================
  135.  
  136. The installation of lp3820 consists of 6 steps:
  137.  1. Making a directory to put it in
  138.  2. Unpacking lp3820
  139.  4. Updating the profile
  140.  5. Setting the LP3820 environment variable
  141.  6. Making sure it all works
  142.  
  143. Note:  The example commands shown here may have to be changed based on
  144. what tools you have installed, and what directories you put things in.
  145.  
  146. Making a directory
  147. ------------------
  148.  
  149. Select a drive which has enough space (2.7 meg for install, 1.8 meg to
  150. run) and create a directory.  If you are not going to install the fonts,
  151. you might want to install lp3820 in an existing directory in your path
  152. instead.  For example, the command:
  153.     md c:\lp
  154.     cd c:\lp
  155. will make a directory called lp on your c drive.  This name will be
  156. used in the following examples, but you may put it on any drive and in
  157. any directory.  This directory should either be in your PATH, our you
  158. must change directory to it before using lp3820.
  159.  
  160. Unpacking lp3820
  161. ----------------
  162.  
  163. lp3820 comes as a zip file which includes this document.  You should
  164. run pkzip to unpack all of the files.  These files do not have to be
  165. all in the same directory.  You should get the following files:
  166.    lp3820.exe  - OS/2 family mode executable file
  167.    lp3820.abs  - A short abstract
  168.    lp3820.pro  - user profile
  169.    lp3820.ftb  - font metrics tables
  170.    lptest.afp  - small test page
  171.    lp3820.doc  - this file
  172.    license.txt - the IBM "asis" license
  173.  
  174. There is a second zip file containing the soft fonts.  This is the
  175. LP382F package.  The soft fonts are quite large, and must be unpacked
  176. before they can be used.  Use pkzip to install them.  The fonts are
  177. not necessary if your printer is a 4029, LaserJet 4, or PostScript.
  178. You will get a large number of files with the extension .dlf .
  179.  
  180. Note:  If you get lp3820 preinstalled, you may distribute it by
  181. placing all .dlf files and license.txt into lp382f.zip.  All other
  182. files (along along with license.txt) should be put unmodified into
  183. lp3820.zip.  You must include the IBM license and abide by it in any
  184. copies or distribution you make of this program.
  185.  
  186.  
  187. Updating the lp3820 profile
  188. ---------------------------
  189.  
  190. Before you can print using lp3820, you must tell it what kind of
  191. printer you have.  As shipped, lp3820 has no default, and so you must
  192. either update the profile or specify a printer name each time you
  193. invoke lp3820.  Using your favorite editor, edit the file lp3820.pro.
  194. This is the profile for lp3820, and it allows you to customize lp3820.
  195.    e lp3820.pro
  196.  
  197. You should see the entry:
  198.     default = none
  199.  
  200. This specifies which of the printer entries below is the correct one.
  201. You can override this on the command line, but this line specifies
  202. which printer entry to use by default.  You should set this default to
  203. match your printer.  This is the name of a printer entry later in the
  204. file.  Set it to one of the following:
  205.  
  206.    4019  =  IBM LaserPrinter 4019 in PPDS mode.
  207.    4029  =  IBM LaserPrinter 4029 in PPDS mode.
  208.    hp    =  HP LaserJet II or compatible (including 4019 in HP mode)
  209.    hp3   =  HP LaserJet III (PCL5 including IBM 4039)
  210.    hp4   =  HP LaserJet 4 (extended PCL5)
  211.    ps    =  Any printer in PostScript mode
  212.  
  213. You should also change the default paper size to match the paper you
  214. have in your printer.  If you are outside North America, you are
  215. probably using A4 paper and not letter size.  You can set the default
  216. paper size to:
  217.  
  218.    a4     = 211mm x 297mm
  219.    letter = 8.5i x 11i       (default if not specified)
  220.    legal  = 8.5i x 14i
  221.    exec   = 7.25i x 10.5i
  222.    b5     = 182mm x 257mm
  223.    a5     = 148.5mm x 211mm
  224.  
  225. Each printer description consists of a few lines describing the
  226. printer.  The first line is a "printer" entry, and gives the name of
  227. the printer.  The next is a line for the printer type, and below that
  228. a line for the printer port.  If your printer is not attached to lpt1,
  229. you will need to update the printer entry.  You can create more
  230. printer descriptions if you like, but you should model them on one of
  231. the existing entries.
  232.  
  233. For the port, you can give the name of a device file, disk file, or a
  234. file extension starting with a dot.
  235.  
  236. Note:  There are a number of other things you can customize in the
  237. profile.  In a number of cases, alternatives are shown, but are
  238. commented out.  You can change entries in the profile to change the
  239. appearance of the multi-up, add font definitions, or specify to use
  240. the raster foils fonts in PostScript.
  241.  
  242.  
  243. Setting the LP3820 environment variable
  244. ---------------------------------------
  245.  
  246. lp3820 needs to know where its files are.  You can do this in several
  247. ways:
  248.     1. Run with all files lp3820 needs in the PATH.
  249.     2. Run with all files lp3820 needs in the current directory.
  250.        (This is actually just a subset of the first).
  251.     3. Set an environment variable LP3820 giving a path to locate the
  252.        files.  The .exe files must still be in the path.  This option
  253.        gives maximum flexibility.  You can set the lp3820 variable to
  254.        several directories, including any place you keep soft fonts.
  255.           set lp3820=c:\lp;c:\pclfonts
  256.        This statement should be placed in your config.sys for OS/2
  257.        mode, and in autoexec.bat for DOS mode.
  258.  
  259. Testing the installation
  260. ------------------------
  261.  
  262. With any luck, lp3820 will now work.  To test it out, a one page
  263. document is included in the package.  To print it, type:
  264.     lp3820 lptest
  265.  
  266. This should show you an title line, and several normal fonts,
  267. including some symbols (left arrow, theta, right arrow) on the last
  268. line.  This will also show the version of lp3820.
  269.  
  270. lp3820 is a 16 bit family mode application, and will run in either an
  271. OS/2 or a DOS session.  It will also run in DOS, but requires 3.3 and
  272. above and a i286 or above processor.  Complex documents may require
  273. a large amount of memory in DOS mode.
  274.  
  275. Since lp3820 creates the final datastream for the printer, you must
  276. either set the OS/2 print driver to match the datastream, or use the
  277. IBMNULL print driver.
  278.  
  279. Now extract the text from the file by typing:  lp3820 lptest.afp text
  280. You should have the file lptest.doc on your disk.  You should also try
  281. lp3820 out on one of your own documents.  To do this, download any
  282. LIST3820 document.  Remember to download the file in binary (without
  283. doing EBCDIC to ASCII translation).
  284.  
  285.  
  286. Notes and Restrictions
  287. ======================
  288.  
  289. lp3820 can often do a very good job at printing AFP documents on a
  290. personal laser printers.  However, there are some documents which do
  291. not print correctly, and there are some cases when the appearance is
  292. wrong.  To understand why this occurs, you should understand the
  293. differences between the host printers and their fonts, and the
  294. personal laser printers and fonts.
  295.  
  296. Resolution:  AFP documents are designed for the printers which print at
  297.     240 dots per inch.  Personal page printers are mostly 300 dpi. Thus,
  298.     the same fonts cannot be used, and images must be scaled at a 4 to 5
  299.     ratio.  There are options to control the scaling of the image.
  300.     lp3820 does support printing of documents formatted at 300dpi.
  301.  
  302. Page size:  Most personal laser printers require a larger margin at
  303.     the edges of the page, and thus have a smaller printable area
  304.     than the 3820.
  305.  
  306. Font Differences:  lp3820 maps host fonts to PC fonts.  The fonts may
  307.     have different size and appearance than the host fonts for which the
  308.     document was formatted.  This is especially true when the AFP
  309.     file was formatted using the Sonoran family of fonts (the basic
  310.     3820 fonts).  The results are better when the new Core Interchange
  311.     font families are used.
  312.  
  313. Font Set:  When you use DCF to create an AFP document, you format it
  314.     using a set of AFP fonts which are installed on your S/370.  Many
  315.     sites have 100 Mb of AFP fonts installed (they are of course shared
  316.     between all users).  lp3820 has internal support for many of the
  317.     fonts shipped by IBM.
  318.  
  319.     lp3820 ships a set of soft fonts, but the number of fonts were
  320.     restricted to keep the size for the lp3820 package below 2Mb.
  321.     lp3820 ships fonts for 8, 9, 10, 11, 12, 14, 16, 18, 20, and 24
  322.     points.  If you wish to take up more room on your disk, you can
  323.     install additional soft fonts.  If you add soft fonts, you must
  324.     update the lp3820 profile to tell lp3820 what fonts are available.
  325.     Any available HP or PPDS soft fonts can be used.  However, it is
  326.     very important that you correctly identify to lp3820 the codepage
  327.     that the font is in.
  328.  
  329. Code Pages:  AFP supports an arbitrary number of code pages, by reading
  330.     the code page information from a file.  The soft fonts used by
  331.     lp3820 do not have enough information to use this strategy.  lp3820
  332.     has internal tables for a large set of code pages.
  333.  
  334. Rotation:  lp3820 does not support rotation on 4019 or HP LaserJet II
  335.     printers.
  336.  
  337. Compressed Image:  lp3820 does not support AFP documents containing
  338.     compressed (MMR, G3, G4) images.  Only IM level images are
  339.     supported.
  340.  
  341.  
  342. The lp3820 command
  343. ==================
  344.  
  345. lp3820 basically runs as a command line filter.  You can integrate it
  346. into other programs using REXX.  If no operands are given, lp3820 will
  347. prompt for some basic options.  Options can start with either a dash (-)
  348. or a slash (/).
  349.  
  350. lp3820  file  printer  -options
  351.  
  352.   file  The name of an AFP document.  If no extension is specified it
  353.         defaults based on the setting of AFPEXT.  The file name can be
  354.         a dash (-) to indicate standard input.
  355.  
  356.   printer The name of a printer entry in lp3820.pro
  357.  
  358.   -?    Show brief command help
  359.  
  360.   -??   About lp3820. Show the author and copyright notices for lp3820.
  361.  
  362.   -f file:  Override the printer port. The operand is a filename. The
  363.         file name can be either the next operand, or part of the current
  364.         operand following a colon or equals.  A dash (-) indicates stdout.
  365.         The following are all valid:
  366.           -f outfile.ps
  367.           -file:lpt2
  368.           /f=c:\temp\out.pcl
  369.           -f:-
  370.  
  371.   -p Page range: Specify a range of pages to print. This takes one or
  372.         two page names as operands. These can be specified as * to
  373.         indicate the start or end of the document. If only one page is
  374.         specified, then only that page is printed. The pages must be
  375.         separate operands. Be careful not to put the printer name after
  376.         a single page, it will be considered the ending page number.
  377.         These are all valid page ranges:
  378.           -p 2
  379.           -p 3 5
  380.           -page iii 3-19
  381.           /p 5 *
  382.  
  383.   -pn Page number range: Specify a range of pages to print as a start
  384.         number and count.  This can be combined with the -p option to
  385.         create a full set of possibilities.  The first operand is the
  386.         number of the page to start with.  The second operand is the
  387.         count of pages.  If the count is not given, it defaults to one.
  388.         These are all vaid page number ranges:
  389.           -pn 2
  390.           -p 2 -pn 1 5
  391.           /pn 5 2
  392.  
  393.   -co Copies: Specify a number of copies. The copy count is a separate
  394.          operand, or follows a equal (=) or colon (:). This value is put
  395.          into the datastream, and it is up to the printer to honor this
  396.          count. Normally, this will cause the copies to come out
  397.          uncollated (n copies of each page).
  398.          These are valid copies:
  399.            -co=3
  400.            -co:2
  401.            /copies 3
  402.  
  403.   -q Quiet: Do not give status information.  If this is selected, only
  404.          fatal error messages will cause any output. This is designed to
  405.          be used when lp3820 is being used without the user being aware
  406.          of it.
  407.  
  408.   -d Debug: Show additional messages.  This should be used when modifying
  409.          the profile, or when trying to determine why lp3820 is not
  410.          giving you the expected results.  Normally errors in the profile
  411.          are just ignored.
  412.  
  413.   -s Source: Specify the paper source as 1, 2, or M. Two sources can be
  414.          specified, the first is used for the first page, and the second
  415.          from subsequent pages. If only one paper source is given, it is
  416.          used for all pages. The value is put into the data stream, and
  417.          it is up the the printer to use it. By default, the hardware
  418.          default paper source is used. Examples of valid paper source
  419.          specifications are:
  420.            -s2
  421.            -s21
  422.            /sm1
  423.  
  424.   -odd  Print only odd pages.  This can be used as part of a two pass
  425.         duplex.
  426.  
  427.   -even Print only even pages.  This can be used as part of a two pass
  428.         duplex.
  429.  
  430.   -a    Average sync: this gives the best appearance and smaller data
  431.         stream, and is thus the default, but it only works for PostScript.
  432.         For other datastreams this is the same as char sync.
  433.  
  434.   -c    Character sync: set cursor position for each character This is
  435.         the normal default, and need not be specified unless the printer
  436.         entry was changed.
  437.  
  438.   -n    No sync: set cursor position only on absolute moves. This
  439.         creates a smaller output file, but the results can look very
  440.         strange if the font substitution is not exact.
  441.  
  442.   -dx   Duplex:  Force the hardware duplex option.
  443.  
  444.   -ns   No scale: Do not scale the image, but put out the entire page
  445.         as if it were a 300 dpi document.  This is useful for documents
  446.         with full page images such as the output from PS/370.  This
  447.         option also sets a -200 left margin.
  448.  
  449.   -ni   Small images: Do not scale the image, leaving it smaller, but
  450.         make the text the normal size.  The image is aligned at the
  451.         upper left corner on the physical page.
  452.  
  453.   -cg=# Copy group: This is used for suppression support, and specified
  454.         which copy this represents.
  455.  
  456.   -r    Resident: Assume that all fonts are resident. This option causes
  457.         no fonts to be downloaded. This should only be used if you have
  458.         an external resource manager to download fonts. In fact, you are
  459.         better off never using this option, since it means that internal
  460.         fonts will not be downloaded, and the resource manager has no
  461.         access to them.
  462.  
  463.   -x    Extract:  This allows files within lp3820.ftb to be extracted.
  464.         This is useful to see or modify the internal files.  For
  465.         instance to see the standard 4029 profile you can do:
  466.             lp3820 -x !std4029
  467.         This creates the file !std4029.pro.  You can modify this and
  468.         update your profile entry to use the new file instead of the
  469.         internal !std4029.
  470.  
  471.   -xl   Extract list:  This gives a list of all files which can be
  472.         extracted using the -x option.
  473.  
  474.   -z    Send messages to stdout instead of stderr.  This allow the
  475.         redirection of stdout in system which do not allow stderr
  476.         to be redirected.
  477.  
  478.  
  479. lp3820 Functions
  480. ================
  481.  
  482. Page Names:
  483.  
  484. In AFP, page names are an 8 character string.  The page name is given
  485. in the start and end page controls.  lp3820 uses this name to show
  486. progress, and to allow selection of a range of pages to print.
  487.  
  488. Although the page names are often numeric, they are not always so.  It
  489. is very common to start a document with roman numerals.  When using
  490. folio by chapter, the page name contains the chapter name, and some
  491. punctuation.  It is also possible to have duplicate page names.
  492.  
  493. lp3820 treats the 8 characters as a string, and matches against it in a
  494. case independent manor (thus ii and II are the same).  If there are
  495. duplicate page names, only the first one is selected as a begin page,
  496. and the first occurrence after the begin is selected as the end page.
  497.  
  498. If you do not know the page names of a document, try the following:
  499.    lp3820  file.afp text >nul -p 9999
  500. This will show you a list of all the pages in the document.
  501.  
  502.  
  503. Duplex:
  504.  
  505. You can use the duplex function of your printer by setting the duplex
  506. option of the printer entry to "on" or "tumble".  Using the -dx option
  507. on the command line sets duplex to on.  Hardware duplex will be ignored
  508. on printers which do not have a duplex option.
  509.  
  510. Most personal page printers do not have a duplex function, but this can
  511. be simulated by writing every other page, and putting the paper thru the
  512. printer twice.
  513.  
  514. You can also specify that only half of the pages are printed by using
  515. the -even or -odd options.  To create duplex, you would normally first
  516. print the even pages, and then rerun lp3820 to print the odd pages.
  517.  
  518. Note:  Even and odd refer to pages within the page range, and not to
  519. whether the page number is even or odd.  If you start the range with
  520. an even page number, then the odd pages will have even numbers printed
  521. on them.  Also, when using page sets, the first n pages are odd.
  522.  
  523. Note:  Sending the paper multiple times thru the printer is not
  524. officially supported, although it seems to work OK on most printers.  If
  525. you have a problem with paper curl, using duplex will probably make it
  526. much worse.
  527.  
  528.  
  529. Top and Left Margins:
  530.  
  531. The settings for top and left margins are an attempt to compensate for
  532. the fact that the printable area on most personal page printers is
  533. smaller than the 3820.  It also compensates for the fact that printers
  534. in HP mode do not measure from the paper edge, but from the printable
  535. edge, which varies by model.  The value specifies the amount to move the
  536. page to the top or left on the paper.  Since it is most normal to want
  537. to move the contents down and to the right, these values are often
  538. specified as negative.
  539.  
  540. Top and left refer to the top and left of the page as it moves thru the
  541. printer, not the top and left of the text.  The exception to this is
  542. 4019 landscape mode.  Since the 4019 does not correctly implement
  543. orientation, the orientation change is faked using landscape
  544. orientation, and the top and left are based on landscape orientation.
  545.  
  546.  
  547. Font Compression:
  548.  
  549. The fonts shipped with lp3820 are compressed PPDS fonts.  To use them
  550. in other utilities, you need to first decompress them.  lp3820 will
  551. use either the compressed or decompressed versions.  You can decompress
  552. them using the -x option of lp3820 and giving the font name as:
  553.     lp3820 -x helv12.dlf
  554.  
  555.  
  556. PostScript Multi-up:
  557.  
  558. When using PostScript, it is possible to print multiple logical pages
  559. on the same physical page.  This is known as multi-up (as in 2-up or
  560. 4-up).  This function does not work in PPDS or HPPCL modes.  There
  561. are several parameters including the scale factors, rules, and
  562. shadows which can be specified.  Modify the "multiup" entry in the
  563. profile to make these changes.
  564.  
  565. A special case of multi-up is 1-up, which performs the automatic scaling
  566. of page to paper.  This will make a small page fill the paper, or make
  567. a large page fit on the paper.
  568.  
  569.  
  570. lp3820 Profile
  571. ==============
  572.  
  573. The lp3820 profile is kept in the file lp3820.pro.  For examples of the
  574. items discussed below, you should look in this file.
  575.  
  576. Syntax of profile entries
  577. -------------------------
  578.  
  579. The profile is made up of lines.  On each line is either a comment or a
  580. profile entry.  Lines starting with an blank, tab, or asterisk (*) are
  581. comments.  Profile entries have a keyword starting at the beginning of
  582. the line.  The keyword can be in any case.  The keyword is followed by
  583. an optional equal sign, and operands.  Any characters following the last
  584. operand on a line are ignored, and can be used as comments.  In entries
  585. with an undetermined number of operands, an operand starting with '<'
  586. is normally treated as the start of a comment.
  587.  
  588.  
  589. Global Profile Entries
  590. ----------------------
  591.  
  592. Global profile entries allow the setting of lp3820 program global
  593. setting.  Since there is only one location to set, it only makes sense
  594. to have one of each of these.  Many includeall entries can be used.
  595.  
  596.  
  597. DEFAULT
  598.  
  599. A default entry defines the default printer entry to use if none is
  600. specified on the lp3820 command.  The first printer found whose names
  601. has been specified as the default is used as the printer definition.  A
  602. single operand gives the name of the printer description.
  603.  
  604.  
  605. AFPEXT
  606.  
  607. An afpext entry defines the default extension for the input apf file if
  608. it has no extension.  The operand is a name, and should start with a
  609. dot.  The default is to use .afp.  Only the last fontext entry found
  610. in the profile is used.  This must be placed before the first printer
  611. description.
  612.  
  613.  
  614. FONTEXT
  615.  
  616. A fontext entry defines the default extension for soft fonts for which
  617. no file name is given.  The operand is a name, and should start with a
  618. dot.  The default is to use .dlf.  Only the last fontext entry found
  619. in the profile is used.
  620.  
  621.  
  622. PSEGEXT
  623.  
  624. A psegext entry specifies the extension to be used for external PSEGs
  625. found in the datastream.  The operand is a name, and should start with a
  626. dot.  The default is to use .pse which is the default extension created
  627. by the download.  Only the last psegext entry found in the profile is used.
  628.  
  629.  
  630. OVLYEXT
  631.  
  632. A ovlyext entry specifies the extension to be used for external overlays.
  633. The operand is a name, and should start with a dot.  The default is to
  634. use .ovl which is the default extension created by the download.  Only
  635. the last ovlyext entry found in the profile is used.
  636.  
  637.  
  638. INCLUDEALL
  639.  
  640. An includeall entry allows an extension of the profile.  This include is
  641. done regardless of whether the current printer entry is selected.  Up to
  642. four levels of includes are allowed.  The include facility is used by
  643. the system to define standard definitions used by all printer entries.
  644.  
  645.  
  646. PATH
  647.  
  648. A path entry allows the specification of an additional path to use
  649. in searching for files.  This can be used to specify where additional
  650. font files are located.  This is designed to be used in LAN situations
  651. so that each user does not need to set an LP3820 environment variable.
  652.  
  653.  
  654. METRICS
  655.  
  656. A metrics entry allows multiple .ftb files to be used.  You should
  657. normally include lp3820 as the first entry in the list.  You may have
  658. up to four metrics entries in the list.  This entry must precede the
  659. first include or printer description.
  660.  
  661. Note:  This entry allows additional function to be shipped as separate
  662. packages.  Currently, there are no such packages available outside IBM.
  663.  
  664.  
  665. Printer Description Entries
  666. ---------------------------
  667.  
  668. Printer Description Entries exist within a printer description, and only
  669. have effect for that printer.  These entries are used to describe a
  670. particular printer.  These are stanzas in Unix terminology.
  671.  
  672.  
  673. PRINTER
  674.  
  675. A printer entry defines a printer description.  The printer description
  676. starts with a printer entry, and continues until the next printer entry
  677. or end of file.  There is a single operand, which is the name of the
  678. printer description.  This can be 1 to 16 characters, and case is
  679. ignored.  You can have as many printer descriptions as desired.
  680.  
  681. A particular printer description may be used by giving this name as the
  682. second name on the lp3820 command.
  683.  
  684.  
  685. TYPE
  686.  
  687. A type entry defines the type of printer, which is used to create
  688. different data streams.  If an incorrect type is used, the result will
  689. probably be garbage on the screen.
  690.  
  691. There is a single operand, which gives the type.  The following types
  692. may be used:
  693.  
  694.     4019   IBM LaserPrinter 4019 in PPDS mode.
  695.     4029   IBM LaserPrinter 4029 in PPDS mode.
  696.     hp     HP LaserJet II or compatible (including 4019 in HP mode)
  697.     hp3    PCL5 (HP LaserJet III and IBM LaserPrinter 4039)
  698.     hp4    PCL5 extended (HP LaserJet 4)
  699.     ps     Any printer in PostScript mode
  700.     4216hp HP LaserJet+ emulation of the 4216 with scalable fonts
  701.     text   Use no printer, but just extract the text
  702.  
  703. If you have a 4029, it is best to use the 4029 PPDS support, although
  704. the 4019 and HP support will also work.
  705.  
  706. The HPPCL (hp) support works on all HP LaserJet II and above printers
  707. (including the LaserJet III and LaserJet 4), and all of the compatible
  708. printers.  It partially works on on LaserJet+ printers.  The PCL5
  709. support gives a full function support for scalable fonts and mixed
  710. orientation documents.
  711.  
  712. PostScript is generally slower than either PPDS or HPPCL, especially
  713. when doing images.  PostScript does support multi-up and correct
  714. page scaling.
  715.  
  716.  
  717. PORT
  718.  
  719. A port entry gives the name of the file to which the output is to be
  720. written.  This is normally the name of a printer device file, but may be
  721. any disk file.  These is a single operand, which is a file name.
  722.  
  723. If the name begins with a period, it is treated as an extension, and
  724. this extension replaces the extension of the input file to create the
  725. output file name.  This is normally used when the output is to a disk
  726. file.
  727.  
  728. A single hyphen (-) indicates that the output should be sent to standard
  729. output.  This is the normal form in Unix.
  730.  
  731. This entry is overridden by the -f option on the command line.
  732.  
  733.  
  734. SETUP
  735.  
  736. The setup option allow the specification of printer specific controls to
  737. be added to the datastream.  This should be done with care as it could
  738. cause the file not to print.  Three setup string locations are
  739. supported:
  740.   1  At the very start of the file (before the reset)
  741.   2  During document setup
  742.   3  At the beginning of each page.
  743.   4  At the very end of the file (after the reset)
  744.  
  745. There are two operands to the setup option.  The first specifies which
  746. string.  The second gives the string to send to the printer.  This can
  747. be flat text, or escape sequences.  An escape sequence consists of a
  748. backslash followed by either two hex digits, or the a special character
  749. from the list below:
  750.   \  Insert a backslash (0x5c)
  751.   (  Insert an escape (0x1b)
  752.   n  Insert a line feed (0x0a)
  753.   r  Insert a cariage return (0x0d)
  754.  
  755.  
  756. Note: The setup string is output in ASCII, and will not give correct
  757. results in TEXT mode on an EBCDIC machine.
  758.  
  759.  
  760. TOP
  761.  
  762. A top entry moves the text vertically on the page.  This is designed to
  763. compensate for any automatic margin added by the printer.  It can also
  764. be used to compensate for the fact that many printers do not allow
  765. marking in the top .25 inch of the page.  This can also be used to
  766. match the compensation of the 3800-3 printer. There is a single operand
  767. which is a numeric value which represents a number of 1/300i units.
  768.  
  769. The value is defaulted by printer type, but is zero for most printers.
  770. A positive value has the effect of moving the contents up on the page.
  771. A negative value has the effect of moving the contents down on the page.
  772. Remember that moving the contents so that the top line shows, may cause
  773. the bottom to be not shown.  This is because the 3820 has a longer page
  774. than can be printed on most personal laser printers.
  775.  
  776.  
  777. LEFT
  778.  
  779. A left entry moves the text horizontally on the page.  This is designed
  780. to compensate for any automatic margin added by the printer.  It can
  781. also be used to compensate for printers which do not print all the way
  782. to the left paper edge.  There is a single operand which is a numeric
  783. value which represents a number of 1/300i units.
  784.  
  785. The value is defaulted by printer type.  Most HP printers have a
  786. non-zero default.  A positive value has the effect of moving the
  787. contents to the left.  A negative value has the effect of moving the
  788. contents to the right.
  789.  
  790.  
  791. OPTION
  792.  
  793. An option entry specifies variations on the type.  This is mostly used
  794. for PostScript (ps) printers.  Note that the name is option (there is
  795. no s at the end).  There can be multiple options specified in one entry,
  796. and there can be multiple option entries in a printer description.  If
  797. they conflict, the last one specified is used.  The following options
  798. are allowed:
  799.  
  800.   aesbin    Download images in binary. To use this option, you must set
  801.             the printer to binary mode, and must be using AES.
  802.   binary    Download images in binary. To use this option, you must set
  803.             the printer to binary mode, and not be using AES.
  804.   7bit      Use only 7 bit ASCII codes. Use this option if you are
  805.             sending the PostScript over a communications line with
  806.             parity.
  807.   hex       Use hex mode for images. This is the default and cancels
  808.             aesbin, binary or 7bit mode. You may generate hex mode
  809.             PostScript even if you are running in PostScript binary
  810.             mode.
  811.   eoj       Put out an EOJ (ctrl-d) at the end of the file. This is the
  812.             default. noeoj  Do not put out an EOJ at the end of the job.
  813.             This should be used when the file is not being sent to a
  814.             printer.
  815.   boj       Put out an EOJ (ctrl-d) at the beginning of the file. This
  816.             can be used to verify that the previous job is ended, but
  817.             can cause confusion to some PostScript routers.
  818.   noboj     Do not put out an EOJ at the beginning of the file.  This
  819.             is the default.
  820.   sic       Place a Set Initial Conditions command at the start of the
  821.             datastream.  This will force the mode, but make it work only
  822.             on an IBM LaserPrinter (4019 or 4029).  This gives you the
  823.             same affect as AES, in that you can use multiple datastreams
  824.             on the same printer.  In OS/2, you should not use this
  825.             unless your print driver is set to IBMNULL.
  826.   nosic     Do not write a SIC command. This is the default.
  827.   imgcomp   Compress images. This is used in PPDS and PostScript.  It
  828.             works on all 4029s, and late model 4019s.  In PostScript,
  829.             it should generally not be used since it is slow at the
  830.             printer end.  (Although this is not the default or the 4029,
  831.             it is set in the standard profile for the 4029).
  832.   noimgcomp Do not compress images. This is the default for all
  833.             printer types.
  834.   noscale   Do not scale the images, but make the page smaller.  You
  835.             may also need to set left margin.  The top margin takes
  836.             care of itself.
  837.   smallimg  Small images.  This is the same as the -ni command option.
  838.   top       Top align when page size is not the same as paper size
  839.   center    Center align when page size is not the same as paper size.
  840.             This is the default.
  841.   bottom    Bottom align when page size is not the same as paper size
  842.   noalign   Act as if the page size was equal to the paper size.
  843.             This can give erroneous results for rotated pages, but
  844.             works when the page size is set incorrectly.
  845.   xtypo     Use the extended typographic support.  The standard
  846.             includes use this as necessary, and it should not be
  847.             changed.
  848.   nfs       Do minimal support for the LaserJet+ (PCL3).  This
  849.             must be used together with the type 4216hp.
  850.  
  851. OVERLAY
  852.  
  853. Specifies an overlay to be used for the first and subsequent pages.
  854. Two operands may be specified.  If only one is specified, it is used
  855. for the first page only.  An overlay of * may be specified to
  856. indicate no overlay.  The default is to use no overlays.
  857.  
  858.  
  859. PAPER
  860.  
  861. A paper entry allows the specification of the paper size in a printer.
  862. This is necessary in the case of PostScript, and 4029 which allows
  863. rotation.
  864.  
  865. The operands are up to four paper sizes.  The first is the default and
  866. paper source 1.  The second indicates the size of the second paper
  867. source, the third indicates the size of the manual paper source, and
  868. the fourth gives the size of the third source or automatic envelope.
  869. Missing operands default to the first size specified.  If no paper size
  870. is specified, the default is letter
  871.  
  872. The following are valid paper sizes:
  873.     letter  Use US size paper (this is the default)
  874.     a4      Use Metric A4 size paper
  875.     b5      Use Metric B5 size paper
  876.     exec    Use executive size paper
  877.     legal   Use US legal size paper
  878.     a5      Use Metric A5 size paper
  879.  
  880.  
  881. FAMILY
  882.  
  883. A family entry allows the specification of a scalable font family.
  884. This is used for PostScript and 4029 fonts.  Each family entry has
  885. the following entries.  The first 5 are required.  The rest are
  886. optional, and default as specified.
  887.  
  888. All fonts names except the base can be specified as a delta from the
  889. base font name.  This can be an equal sign (=) to indicate a name equal
  890. to the base, an equal plus characters which appends a hyphen and these
  891. characters to the end of the base name, or a hyphen and some characters,
  892. which replaces the final hyphenated piece of the base name with the
  893. specified characters.
  894.  
  895.   class      -  The four byte class name (see font below). For a 4029,
  896.                 monospace fonts should have a minus sign (-) as the
  897.                 fifth character.
  898.  
  899.   base       -  The name of the base font of the family.
  900.  
  901.   italic     -  The name of the italic (or oblique) font of the
  902.                 family.
  903.  
  904.   bold       -  The name of the bold font of the family.
  905.  
  906.   italicbold - The name of the italic and bold font of the family.
  907.  
  908.   codepage   - The codepage of the font. This must be one of the
  909.                internally supported ASCII code pages. This is used to
  910.                specify the contents of the font. A zero value
  911.                indicates that the font should not be re-encoded. In
  912.                general, you should use 850 for the encoded value. For
  913.                PostScript, this is the only encoding which works
  914.                unless you change the header file. For the 4029, those
  915.                code pages supported by both the 4029 and lp3820 can be
  916.                used, but the font extensions assume all 850 chars are
  917.                in the base font. The default is zero.
  918.  
  919.   hscale     - Horizontal scale for non-bold fonts as a percentage.
  920.                The default is 100.
  921.  
  922.   bscaleb    - Horizontal scale for bold fonts as a percentage The
  923.                default is 100.
  924.   vscale     - Vertical scale. This is a multiplier of the given point
  925.                size to actually use. The default is 100.
  926.  
  927. Note: To see example of the family entry use the -x option to extract
  928. the files !stdps or !std4029.
  929.  
  930. In PCL5 the font name represents a font selection field.  This should
  931. contain the style, bold, and typface values.  To select CG Times Bold:
  932.     0v3b4101T
  933.  
  934. Note: In PCL5 (types hp3 and hp4) both vertical and horizontal scaling
  935. is done based on the hscale (or hscaleb).  The vertical scale factor is
  936. not used.  This is due to a deficiency in the HP-PCL5 font support
  937. which does not provide for separate horizontal and vertical scale
  938. factors.
  939.  
  940.  
  941. FORMDEF
  942.  
  943. Specify the name of the formdef to use.  This may override the
  944. settings of left, top, and paper.  This can be overridden using
  945. the -fd command line option, or by a formdef within the document.
  946. The operand is a file name (normal path processing is done).
  947. The file can contain any valid afp data.
  948.  
  949.  
  950. INCLUDE
  951.  
  952. An include entry allows you to include printer specific entries.  This
  953. include is conditional in that it is only done if the current printer
  954. entry is selected.  This has a single operand, which is the file name to
  955. include.  This can be an internal file name (given with no extension).
  956. You can extract these internal files using the -x option.
  957.  
  958.  
  959. MULTIUP
  960.  
  961. A multiup entry allows you to control the PostScript multi-up facility.
  962. The entry consist of a number (1, 2, 3, 4, or 8) giving the number of
  963. pages on the paper, followed by keywords and values.  The value is
  964. optional, and some keywords do not allow a value.
  965.  
  966. The following keywords exist, along with the default and possible
  967. values.  See lp3820.pro for examples:
  968.  
  969.   rule     - Width of the rule.  Default = 5  (0 - 200)
  970.   shadow   - Size of the shadow. Default = 75 (0 - 32)
  971.   gray     - Color of the shadow. Default = 80 (0 = 100)
  972.   scale    - Scale page from possible size. Default = 90 (50 - 150)
  973.   orient   - Orientation.  Default = 0 (0, 90, 180, 270)
  974.   noshadow - Use no shadow (same as shadow 0)
  975.   norule   - Use no rule (same as rule 0)
  976.   thick    - Use thick rule (same as rule 15)
  977.  
  978. Note:  Orientation should normally not be set, as lp3820 tries to
  979. determine it automatically.
  980.  
  981.  
  982. SCALE
  983.  
  984. A scale entry allows a vertical and horizontal scale factor to be
  985. applied to line positions.  This can be used to print a document which
  986. is a little too large for the paper.  This can be because the 3820 page
  987. size is a little larger, or just because it was formatted for A4, and
  988. you are printing on US paper.
  989.  
  990. There are one or two operand, and each is an integer in the range 50 to
  991. 200, and is a percent scale of the vertical and horizontal axis.  The
  992. default if not specified is 100.  The best use of this feature is to
  993. allow the printing of documents formatted for A4 on US 8.5x11 (letter)
  994. paper.  Since the A4 page is longer, the contents at the end of the page
  995. are often lost.  By using a scale factor of about 94, it is possible to
  996. get the entire A4 page onto a letter page.
  997.  
  998. In PostScript, the scale is correctly implemented to fully scale all
  999. of the contents of the page.  For other datastream, fonts are not scaled,
  1000. and images may look strange.
  1001.  
  1002.  
  1003. Advanced Profile Options
  1004. ------------------------
  1005.  
  1006. These additional profile entries are used less often, but may be
  1007. important for advanced usage.
  1008.  
  1009.  
  1010. COPIES
  1011.  
  1012. A copies entry allows the specification of the number of uncollated
  1013. copies to make of each page.  The operand is a single numeric value in
  1014. the 1 to 99 range.  This value is overridden by the /co= command line
  1015. option.  This value is normally left unset in the profile, and set only
  1016. as a command line option.
  1017.  
  1018.  
  1019. DUPLEX
  1020.  
  1021. A duplex entry allows the specification hardware duplex, or the order
  1022. of pages for duplex.  The operand is a keyword and can be:
  1023.  
  1024.     on      Use hardware duplex (long side binding)
  1025.     off     Do not use hardware duplex
  1026.     tumble  Use hardware duplex (short side binding)
  1027.     default Do not specify hardware duplex option
  1028.  
  1029.     even    Print even pages first (the default)
  1030.     odd     Print odd pages first
  1031.     <num>   Give the page set size as a number (1-64)
  1032.  
  1033. Even and odd pages are based on the page count, not by examining the
  1034. page name.  Even printing is most useful for printers with an S paper
  1035. path.  Odd printing is most useful for printers with a straight paper
  1036. path.
  1037.  
  1038. The page set size is normally set by using the multiup entry.
  1039.  
  1040.  
  1041. MOREFONT
  1042.  
  1043. A morefont entry allows the specification of the additional fonts
  1044. families which are to be used to satisfy characters which are not found
  1045. in the base font.  This is done on a per printer description basis.  The
  1046. default is to use xtyp, and symb.  For base fonts not in a standard code
  1047. page, the alternate font in codepage 850 is also used.  In most cases,
  1048. the default morefont selection is correct and should not be changed.  If
  1049. you include another font family in the list, be sure to have at least
  1050. one font entry for this family, which is used to derive the proper
  1051. codepage.
  1052.  
  1053.  
  1054. SOURCE
  1055.  
  1056. A source entry allows the specification of alternate paper source.  If
  1057. no paper source is specified, then the current paper source is used.
  1058. The operands consist of up to two paper sources.  The first indicates
  1059. the source for the first page.  The second indicates the source for all
  1060. subsequent pages.  Only the first character of the paper source is used.
  1061. This can be:
  1062.  
  1063.    1  Use the primary paper tray
  1064.    2  Use the secondary paper tray
  1065.    M  Use manual feed
  1066.    3  Use the third paper source or envelope feed.
  1067.  
  1068.  
  1069. PSFONT
  1070.  
  1071. A psfont entry allows the specification of a PostScript or 4029 type 1
  1072. font to be downloaded to the printer.  All PSFONT entries in the printer
  1073. description are downloaded in the prolog for PostScript.  For 4029, they
  1074. are downloaded only if they are used in the job.  There are two
  1075. operands.  The first consists of a soft font identifier without the size
  1076. field, and the second is a file name.  An attribute of asterisk (*) can
  1077. be used to indicate that this applies to all font attributes.  The
  1078. second operand consists of a file name of the font to be downloaded.
  1079. psfont entries apply to a single printer.
  1080.  
  1081.  
  1082. PSEGPOS
  1083.  
  1084. Specify the position of standalone PSEGs.  Since a standalone PSEG does
  1085. not have page and position information, this can be specified on a
  1086. printer basis.  The page size is set to the paper size, and the
  1087. position can be set with the PSEGPOS entry.
  1088.  
  1089. The entry consists of one or two values which are 1/240 inch units
  1090. from the left and top of the page.  If only one value is specified,
  1091. both left and top are set to this.  The default is 120.
  1092.  
  1093.  
  1094. PSHEADER
  1095.  
  1096. A psheader entry allows the PostScript header file to be modified on a
  1097. per printer basis.  You should not update this unless you know what you
  1098. are doing.  This should only be necessary when the names of the standard
  1099. fonts are non-standard.
  1100.  
  1101.  
  1102. RESERVE
  1103.  
  1104. A reserve entry allows font IDs to be reserved.  This should be used
  1105. when the printer has permanent soft fonts already loaded in the printer.
  1106. By default, lp3820 reserves locations 1 thru 7. The operands are a list
  1107. of values in the 1 to 99 range, indicating the font IDs which lp3820
  1108. should not use.
  1109.  
  1110.  
  1111. RESIDENT
  1112.  
  1113. A resident entry defines a resident font of the printer.  This can be a
  1114. builtin font, font card font, or a permanent soft font which is always
  1115. loaded before lp3820 is run.  There is a single operand which is a soft
  1116. font identifier.  The resident fonts are normally of minimal use to
  1117. lp3820, and very little is gained by specifying them.
  1118.  
  1119.  
  1120. SYNC
  1121.  
  1122. A sync entry allows the specification of when to synchronize character
  1123. position.  The soft fonts supplied do not match perfectly the fonts used
  1124. on the host such as Sonoran Serif.  The resolution of the AFP devices
  1125. (240) is also different from the resolution of personal laser printer
  1126. devices (300).  It is therefore necessary to synchronize positions.
  1127. This can be done in three ways:
  1128.  
  1129.     1. Synchronize by averaging over a word.  This gives a good
  1130.        appearance, and a smaller datastream than character sync, but
  1131.        it works only in PostScript.
  1132.  
  1133.     2. Synchronize on each character.  This gives the best fidelity,
  1134.        but does not look the best in some cases.  It can also generate
  1135.        a large data stream.
  1136.  
  1137.     3. Do no synchronization. Only absolute moves in the source data
  1138.        stream will cause synchronization. This will give correct
  1139.        placement of characters for the target font, but alignment and
  1140.        justification will be incorrect.
  1141.  
  1142. The operand is a name.  Only the first character is used.  This can be
  1143. a for average, c for character, and n for no synchronize.  This entry
  1144. can be overridden by the -c and -n command line options.  In most
  1145. cases, the average synchronization looks best, and this is the
  1146. default.
  1147.  
  1148.  
  1149.  
  1150. Font Mapping Entries
  1151. --------------------
  1152.  
  1153. Font Mapping Entries do not exist within an printer description, but
  1154. apply to all printers.
  1155.  
  1156. To map a from an AFP font to a soft font, lp3820 needs the following
  1157. information:
  1158.    ■ The width of each character in the font
  1159.    ■ The font class, size, and attribute to substitute
  1160.    ■ The file name of the soft font
  1161.    ■ The code page and contents of the soft font
  1162.  
  1163. There are two places it gets this information.
  1164. 1. The file lp3820.ftb contains a list of supported AFP fonts, as well
  1165.    as metrics, and default substitution tables.
  1166. 2. Font mapping entries in the lp3820.pro allow for adding and
  1167.    overriding entries in lp3820.ftb.
  1168.  
  1169.  
  1170. FONT
  1171.  
  1172. A font entry declares the existence of a soft font, and gives the file
  1173. name which contains it.  There must be a font entry for each soft font
  1174. installed on your system.  If you use the fonts shipped with lp3820, or
  1175. rename you fonts to the default names, you do not need to specify a file
  1176. name.  A soft font is identified by a name which is made up of three
  1177. parts:
  1178.     1. The font class given as a four byte name
  1179.     2. The font size in points given as a two digit value
  1180.     3. The font attribute, given as a single character
  1181.  
  1182. Example font identifiers are: time12, helv18b, xtyp08.
  1183.  
  1184. The font classes are derived from the HPPCL font classes, and are given
  1185. a four character name.  The case of the name is ignored.  The following
  1186. classes may be used:
  1187.  
  1188.     line    0 - Line Printer
  1189.     pica    1 - Pica
  1190.     elit    2 - Elite
  1191.     cour    3 - Courier
  1192.     helv    4 - Helvetica
  1193.     time    5 - Times Roman
  1194.     lgot    6 - Letter Gothic
  1195.     scri    7 - Script
  1196.     pret    8 - Prestige
  1197.     pret    9 - Caslon
  1198.     orat   10 - Orator
  1199.     pres   11 - Presentor
  1200.     essa   12 - Essay
  1201.     seri   13 - Serif
  1202.     futu   14 - Futura
  1203.     pala   15 - Palatino
  1204.     souv   16 - Souvenir
  1205.     opti   17 - Optima
  1206.     gara   18 - Garamond
  1207.     coop   19 - Cooper
  1208.     coro   20 - Coronet
  1209.     broa   21 - Broadway
  1210.     hebr   22 - Hebrew *
  1211.     cent   23 - Century Schoolbook
  1212.     unvr   24 - University
  1213.     helo   25 - Helvetica Outline
  1214.     futn   26 - Futura Narrow
  1215.     kori   27 - Korinna
  1216.     reve   28 - Reverse monospace *
  1217.     cloi   29 - Cloiser
  1218.     gall   30 - Galliard
  1219.     avan   31 - Avant Garde
  1220.     xtyp   33 - Extended typographic *
  1221.     logo   34 - IBM Logo *
  1222.     olde   35 - Old English (Windsor)
  1223.     heln   36 - Helvetica Narrow
  1224.     helx   37 - Helvetica Extra Narrow
  1225.     yasm   37 - Hebrew
  1226.     bask   39 - Baskerville
  1227.     garn   40 - Garamond Narrow
  1228.     news   41 - News Gothic
  1229.     goud   42 - Goudy
  1230.     chan   43 - Chancery
  1231.     clar   44 - Clarendon
  1232.     ding   45 - Dingbats
  1233.     apl2   46 - APL2 *
  1234.     book   47 - Bookman
  1235.     sser   48 - Sonoran Serif *
  1236.     ssse   49 - Sonoran Sans Serif *
  1237.     hebm   50 - Hebrew monospace *
  1238.     gill   51 - Gill Sans
  1239.     univ   52 - Univers
  1240.     rock   54 - Rockwell
  1241.     hebh   55 - Hebrew Helvetica *
  1242.     bgot   56 - BookMaster Gothic *
  1243.     symb  137 - Symbol
  1244.     symm  138 - Symbol monospace
  1245.  
  1246. Names marked with an asterisk (*) are private to lp3820.  lp3820 will
  1247. automatically compute the FGID from the font class.  You can also use
  1248. the names fnt followed by a single digit (fnt0, fnt1, etc.).  These are
  1249. designed to allow font mapping without using an actual font name.  The
  1250. font size is given as an two digit value.  When the value is less than
  1251. 10, the leading zero must be used.
  1252.  
  1253. The font attribute is a single character, and can be one of the following:
  1254.  
  1255.         Base font attribute (can also be given as N).
  1256.     I   Italic or Oblique
  1257.     B   Bold
  1258.     X   Bold and Italic (or oblique)
  1259.  
  1260.  
  1261. AFPFONT
  1262.  
  1263. A afpfont entry allows the addition or modification of font entries in
  1264. lp3820.ftb.  This provides lp3820 with metrics and substitution
  1265. information.  There are three operands, the name of the font to define,
  1266. the name of a font to use for metrics, and the soft font identifier for
  1267. the substitution information.  AFP font names are usually eight bytes
  1268. long starting with C0.  DCF mostly uses the 3800 form of the name, in
  1269. which the second character indicates direction.  Upright fonts thus
  1270. start C1.  You can use either form of the name.  You can find the names
  1271. of fonts by looking in the file FONT3820 LISTING which should be on the
  1272. same disk that the AFP fonts are located.
  1273.  
  1274.  
  1275. CODEPAGE
  1276.  
  1277. A codepage entry defines the code page for subsequent font entries.
  1278. This should match the actual code page of the font, and indicates both
  1279. the translation and character contents of the font. The single operand
  1280. is a name.
  1281.  
  1282. The following values are supported internally by lp3820.  These same
  1283. values can be used in other locations where internally supported ASCII
  1284. code pages are required.
  1285.  
  1286.     850   Full international character set
  1287.     850a  International with typographic characters
  1288.     850p  International publishing characters
  1289.     850s  International PostScript set
  1290.     rom8  Font in HP order, no box corners or publishing chars
  1291.     win   Font in Windows (ISO) order, no box corners
  1292.     437   US English PC
  1293.     437a  US English PC typographic subset
  1294.     437b  US English PC small subset
  1295.     437d  HP Danish variant of 437
  1296.     819   ISO Latin 1
  1297.     1004  Desktop publishing
  1298.     symb  PostScript Symbol
  1299.     syma  PostScript Symbol without multi-part characters
  1300.     862   Hebrew variant of 437
  1301.     hebr  Hebrew characters only
  1302.     apl2  APL 2
  1303.     xtyp  lp3820 extended typographics
  1304.  
  1305. If the operand is not one of these, it is used as a file name to find a
  1306. .ftt (font translation table) file.  This can be an internal file
  1307. (within lp3820.ftb), or an external file.
  1308.  
  1309. Note: the tools to create .ftt and .fwt files are currently IBM
  1310. internal use only tools.  These files can be extracted from
  1311. lp3820.ftb.
  1312.  
  1313.  
  1314. AFPCODE
  1315.  
  1316. The AFPCODE entry allows you to specify the existence of a code page not
  1317. internally supported by lp3820.  The operands are the name it is known
  1318. by in AFP, and the file name of the .ftt file.  AFP code page names
  1319. normally start with T1.
  1320.  
  1321.  
  1322. AFPCF
  1323.  
  1324. The AFPCF entry allows you to specify a coded font.  DCF does not use
  1325. coded fonts, but other AFP producers do.  A coded font consists of a
  1326. font and a codepage.  The entry is the name of the coded font (which
  1327. normally starts with an X), the name of a font (which normally starts
  1328. with a C) and the name of a codepage (which normally starts with a T).
  1329. For example:
  1330.    afpcf  x1gt10 c0d0gt10 t1d0base
  1331.  
  1332.  
  1333. lp3820 Errors
  1334. =============
  1335.  
  1336. lp3820 gives a termination message, and also returns a return
  1337. code which can be checked by the caller.  The following return
  1338. codes are possible:
  1339.  
  1340.     0 - Document completed, no warnings
  1341.     1 - Exit from help
  1342.     2 - Unable to open input document
  1343.     3 - Unable to open profile
  1344.     4 - Unable to open PostScript header file
  1345.     5 - Unable to open output file
  1346.     6 - Unable to open font metrics file
  1347.     7 - Version mismatch between lp3820 and metrics
  1348.     8 - Unable to find default font (metrics file error)
  1349.     9 - Printer description not found
  1350.    10 - Invalid structured field (not an AFP document)
  1351.    11 - Zero length structured field (not an AFP document)
  1352.    12 - Invalid text control
  1353.    16 - Unsupported document type
  1354.    18 - Too many download fonts
  1355.    19 - Out of memory
  1356.    20 - lp3820 completed with warnings
  1357.    21 - lp3820 completed with errors
  1358.    27 - Error entry in profile
  1359.    28 - Extract file not found or not valid
  1360.    29 - Extract output file error
  1361.    30 - Extract output font error
  1362.   223 - Version return from -?? option
  1363.  
  1364.  
  1365. Notes:
  1366. ======
  1367.  
  1368. lp3820 has been available within IBM since August 1990, and has a
  1369. large number of users.  The version number reflects eight major
  1370. releases of the tool within IBM.  Profiles and metrics tables from
  1371. before version 2.2 cannot be used with version 2.3.
  1372.  
  1373. This tool is offered "asis" without any claim of suitability and without
  1374. any warranties.  Use and distribution is governed by the license which
  1375. is included in the file LICENSE.TXT.
  1376.  
  1377. IBM has a product - Print Services Facility/2 (PSF/2) - which is
  1378. a complete implementation of AFP in the OS/2 LAN environment.  In
  1379. contrast, lp3820 is an smaller implementation without as much document
  1380. checking, and runs in DOS or OS/2.  PSF/2 supports the attachment
  1381. of AFP printers to a PS/2.
  1382.  
  1383. lp3820 was not developed as an IBM product, or as the part of any
  1384. product.  It is the work of one person in my spare time.  You are free
  1385. to send me comments, but I cannot promise to respond.  (In fact, I may
  1386. not be able to since the internet routing tables are not necessarily
  1387. bi-directional).
  1388.  
  1389.  
  1390. Ken Borgendale -  27 May 1993
  1391.  
  1392.     kwb@vnet.ibm.com
  1393.     IBMMAIL: USIB4KWB
  1394.