13 December 2010

Burying antiquity in technology

Starting to see good results from converting an app from driving a specific breed of dot-matrix impact printer via a specific SCO Unix device node to a more generalised system which will print A4 pages on almost any printer.

How?
  1. Feed the "printer" output into a (text) file;
  2. Set the init sequence to be <HTML><BODY><PRE> & the flush sequence to be </PRE></BODY></HTML>
  3. Redefine the escape sequences for bold/unbold into "<B>" & "</B>" likewise for italics into "<I>" & "</I>" etc, notably page break (^L/\f) into <!-- PAGE BREAK -->;
  4. Cram the text file into htlmdoc & order it to produce PDFs;
  5. lpr nameofPDFfile (or write it where it can be viewed in a file share for emailng purposes)
The next stage is to get into cool stuff like doubled or dotted/dashed underscores, coloured text (or backgrounds), & jamming lists into <TABLE> structures, which would allow bordering a field & using sans-serif fonts instead of teletype fonts.

No comments: