home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 October / usenetsourcesnewsgroupsinfomagicoctober1994disk2.iso / misc / volume13 / lj2ps / part01 / README < prev   
Text File  |  1990-07-02  |  10KB  |  232 lines

  1.                 lj2ps
  2.            A LaserJet PCL to PostScript Translator
  3.  
  4.             Version 1.1 (release)
  5.  
  6.               Christopher Lishka
  7.         Wisconsin State Laboratory of Hygiene
  8.               Data Processing Department
  9.  
  10.                 June 30th, 1990
  11.  
  12.  
  13.                   Contents:
  14.  
  15.         1. Introduction
  16.         2. This Distribution, and How To Create lj2ps
  17.         3. Implementation Notes
  18.         4. Miscellaneous (Things I Have To Get Off My Chest)
  19.         5. Contacting Me
  20.  
  21.  
  22. 1. Introduction
  23.  
  24. The lj2ps program translates HP LaserJet PCL ("Page Control Language")
  25. to PostScript.  Currently it converts a subset of the LaserJet Series
  26. II language (PCL 4) to device-independent PostScript.
  27.  
  28. lj2ps was originally written to allow my organization to "upgrade" our
  29. LaserJets to LaserWriters, yet still have a way to print PCL files.
  30. Due to a lack of time, not all of PCL is emulated (this is discussed
  31. below).  I am releasing this program to the "real world" at the
  32. suggestion of by boss and coworkers, and with the hope that others
  33. will also find this program useful and may even extend its
  34. capabilities.
  35.  
  36.  
  37. 2. This Distribution, and How To Create lj2ps
  38.  
  39. Included in this distribution are all of the source files for lj2ps,
  40. documentation, a test suite, and a metrics suite.
  41.  
  42. All source files are included in the top level directory, along with
  43. the Makefile and README file.  To create lj2ps, simply type "make".
  44. To clean the directory, type "make clean".  Pretty simple, huh? ;-)
  45. There are probably other options in the Makefile, but since I
  46. regularly use "cake" (instead of make), and since I generated it with
  47. mkmf (automatic Makefile creator), I am not sure what they are.  Feel
  48. free to edit it.  Those who are interested in the Cakefile, please
  49. contact me.
  50.  
  51. The TestSuite directory contains many tests used to check the
  52. compatibility of lj2ps with real LaserJets.  Similarly, the
  53. MetricsSuite directory is used to tune lj2ps to produce output which
  54. looks like LaserJet output.  These are discussed in more detail in the
  55. implementation section below.
  56.  
  57. The documentation directory has several files in it.  Here are
  58. explanations of them:
  59.  
  60. BugFile        Known bugs that affect lj2ps are detailed here.  Each
  61.         entry identifies the date detected, revision affected,
  62.         and the person logging the bug (usually me!).  The
  63.         LogFile describes which bugs have been fixed.
  64.  
  65. Copying        This is the standard Free Software Foundation
  66.         copyleft.  lj2ps is distributed according to these
  67.         restrictions.  Please look through it so that you are
  68.         familiar with the conditions of use for lj2ps.  The
  69.         only other thing that I ask is that you send me
  70.         changes (with descriptions) if you make them, so that
  71.         I can benefit from your work.
  72.  
  73. LogFile        This file contains descriptions of each revision of
  74.         lj2ps.  All changes including bug fixes, added
  75.         features, and removals are detailed here.
  76.  
  77. compile.options.doc
  78.         Options are available at compile-time to conditionally
  79.         include or exclude features when the program is
  80.         created.  This file describes the options currently
  81.         available.
  82.  
  83. limitations.doc    Any program worth its salt has certain limitations.
  84.         lj2ps is no exception.  This file lists some that I
  85.         know about.  Feel free to fix any (or all) of them.
  86.  
  87. lj2ps.l        The man page for lj2ps, to be installed in
  88.         /usr/man/manl.  Use the command "nroff -man lj2ps.l"
  89.         to create the documentation file.
  90.  
  91. measurements.doc
  92.         One of the worst aspects of LaserJets is the many
  93.         different measurements used by different commands,
  94.         This file lists all measurements that I know of.
  95.  
  96. parameter.scanner.idraw
  97.         A diagram of the parameter scanner.  This file was
  98.         produced with the drawing program "idraw," and can be
  99.         printed on any PostScript printer.
  100.  
  101. scanner.doc
  102.         There are two distinct (yet related) scanners used in
  103.         lj2ps.  Scanner.doc describes the conceptual design I
  104.         used in creating them, which is derived from standard
  105.         scanner and finite state automata theory taught in
  106.         college (where do you think I learned it from? ;-).
  107.  
  108. suggestions.doc    This file lists aspects of lj2ps that need work.  It
  109.         may also provide some insight as to how lj2ps was
  110.         designed.  If you have some free time, and need some
  111.         suggestions on how to improve the program, then look
  112.         here. 
  113.  
  114. supported.commands.doc
  115.         As detailed below, I did not have time to emulate all
  116.         PCL commands.  This list shows which ones are (and
  117.         are not) supported.
  118.  
  119. text.scanner.idraw
  120.         A diagram of the text scanner.  This file was produced
  121.         with the drawing program "idraw," and can be printed
  122.         on any PostScript printer.
  123.  
  124.  
  125. 3. Implementation Notes
  126.  
  127. The program is written completely in K&R C (although not ANSI), and
  128. the C code should compile on nearly every standard machine out there.
  129. To my knowledge, I have not used any "strange" C operators or
  130. combinations, so this program should work on anything from a PC to a
  131. super-computer.
  132.  
  133. I built the program with the idea of emulating full LJII PCL, so all
  134. of the actual command syntax is parsed.  However, I have only
  135. implemented the commands which I needed.  Left out are graphics,
  136. macros, and soft font commands (among others).  It should not be that
  137. hard to add features to this program, and I have included variables
  138. (some yet unused) for most (if not all) aspects of LaserJet operation.
  139. Feel free to work on extending this program to emulate the unfinished
  140. PCL commands, as well as fixing some of the inconsistencies that will
  141. likely pop up.  All I ask is that you send me any changes that you
  142. make, so I can add the same features to my own version (my address is
  143. listed at the end of this file.
  144.  
  145. I have designed lj2ps with efficiency in mind.  To this end, I
  146. hand-coded the scanner in C instead of generating it with Lex.  I have
  147. also spent some time profiling the execution.  Although one major
  148. bottleneck has been fixed, most of the program actually runs at a
  149. reasonable rate.  As would be expected, much of the execution time is
  150. spent in the scanner and _doprnt.  The scanner could likely be sped up
  151. some more (a colleague suggests "caching" several variables in
  152. registers), but I have left this for the future.
  153.  
  154. I have also designed the program with accuracy in mind.  Included in
  155. this distribution are two suites of files: one for testing, the other
  156. for accurate reproduction.  The test suite is an attempt at providing
  157. test files which will exercise critical and nit-picky features of
  158. LaserJet Series II printers.  It is by no means complete.  I have only
  159. included tests for features that are needed at our organization, and I
  160. have likely even left out some of these.  I encourage you to add more
  161. files to the test suite; if several people contribute, a nice
  162. collection could be created.  The metrics suite provides print samples
  163. which highlight different measurements.  For instance, you could test
  164. inter-line spacing by printing the appropriate metrics file on a
  165. LaserJet and a PostScript printer, and then tweak lj2ps to match the
  166. LaserJet's output.  This suite is also not complete, so feel free to
  167. add more files.
  168.  
  169.  
  170. 4. Miscellaneous (Things I Have To Get Off My Chest)
  171.  
  172. It is unlikely that I will have any time at work to finish this
  173. program.  I will only support it locally for our own users.  Although
  174. it would be nice to work on this outside of my job, I have so many
  175. other program (and non-program) ideas that I likely won't do much more
  176. with lj2ps.  Therefore it is up to you to build in the missing
  177. functionality that you want.
  178.  
  179. Even though the major reason I wrote this was because our organization
  180. needed it, a significant driving-force for me was a "proof of
  181. concept."  I always thought that PostScript was a much better language
  182. than LaserJet PCL, and this program provided me with a way to prove
  183. it.  Even though this revision of lj2ps is limited, I am convinced
  184. that one could fully emulate a LaserJet with a filter (like lj2ps) and
  185. a PostScript printer.  In fact, I bet it could be done with PostScript
  186. alone, although it would be incredibly slow.  However, one cannot
  187. emulate a PostScript printer using PCL.  Most (if not all) PostScript
  188. to LaserJet emulators are programs (in software or hardware) which
  189. send bitmaps to a LaserJet; PCL is pretty-much bypassed.  This says a
  190. lot about the two languages.
  191.  
  192. I have spent several years writing programs which use PCL on
  193. LaserJets.  I have just finished a translator that parses and emulates
  194. PCL.  With all this experience and time spent using PCL, all I can say
  195. is that it leaves a really bad taste in my mouth.  It is not user
  196. friendly, not consistent, and not robust.  Its syntax is lousy, its
  197. commands are impossible to remember, and it inner workings are very
  198. hard to figure out (believe me, I spent too much time doing this!).
  199. Whoever is responsible for developing PCL ought to be taught a lesson.
  200. I have much respect for many Hewlett Packard products (like the hp28s
  201. and hp48sx calculators).  However, the LaserJet's language is one of
  202. HP's worst creations.  Suffice it to say that the HP LaserJet is the
  203. IBM PC of the laser-printer world.
  204.  
  205.  
  206. 5. Contacting Me
  207.  
  208. If you have any additions, fixes, or problems; need to know more about
  209. the secret workings of the code; have suggestions for improving lj2ps;
  210. or simply want to say hello, you can contact me at:
  211.  
  212.     Internet:    lishka@uwslh.slh.wisc.edu
  213.     UUCP:        ...!uunet!uwvax!uwslh!lishka
  214.  
  215.     Work phone:    (608) 262-4485 (Tues.-Sat., 5am-9pm)
  216.  
  217.     Address:    Christopher Lishka
  218.             Data Processing Dept.
  219.             Wisconsin State Laboratory of Hygiene
  220.             465 Henry Mall
  221.             Madison, WI     53715
  222.  
  223. My only real request is that you send me any bug fixes, enhancements,
  224. or other modifications that you have made.  Please don't send source
  225. trees without contacting me first.  The best thing to send is a
  226. context-diff (e.g. for "patch") from some released version.
  227.  
  228. If you like this program enough to donate some money, then I ask that
  229. you give it to charity (for example: an environmental, peace, or
  230. homeless organization).  It will make both of us feel good, and it is
  231. even tax-deductible.
  232.