home *** CD-ROM | disk | FTP | other *** search
- === Documentation for ASCII-PS
- === A program to dump ASCII files to a postscript printer
- === Author: David Jeffrey <djeffrey@uwo.ca>
- === Date: 6 May 1990 (my birthday)
-
- Purpose:
- This program will take a file containing ASCII text and generate
- the postscript commands needed to print that file. The commands can
- be sent directly to an attached printer or written to a file.
-
- History:
- My department got a laser printer and I wanted to print program
- listings on it. I was particularly keen on compressing them
- into the smallest number of pages possible. Similarly for
- spreadsheets, posting labels etc. This is the main purpose of
- the program. Other functions were later added which may be
- specific to the QMS brand of printer which we bought.
-
- Other Options:
- If you have any of the following problems, you may
- like to look at the other options offered by my program.
- (1) Large postscript files will not produce output.
- (2) When several different packages are used one after the
- other, the printer appears to sulk and do nothing.
-
- Getting started:
- If you have found ASCII-PS.EXE, just run it and answer the questions
- truthfully. If you have the source ASCII-PS.BAS, then load it into
- QuickBasic 4.5 or similar and compile it. If your computer is
- connected to the printer through a serial port with a
- complete serial cable (not one of your dinky 2-wire jobbies), then
- you can select any option, otherwise only the file conversion
- option will be useful.
-
- Managing QMS or similar printers:
- A QMS printer runs by accepting "jobs". A job is a set of postscript
- commands terminated by a control-D. If there is an error in the set
- of commands, either because your application program made an error or
- because there was a transmission error, there will be no output unless
- you have loaded special postscript error handlers. There is, however,
- an error message returned over the serial line, if you can read it.
- Further, it is likely that the printer will become confused waiting for
- a control-D to terminate the current job and then appear to be catatonic.
- The advantages of sending a file directly to the printer using the
- program are (1) the serial connection is properly managed by BASIC
- rather than DOS's inadequate MODE and COPY commands. (2) Error messages
- from the printer are displayed. (3) The printer can often be reset
- when it appears to have halted.
-
- Trouble-shooting:
- The QuickBasic compiler is not perfect. I have found that _within_ the
- Quickbasic development environment, the program always works perfectly,
- but when it is compiled to a stand-alone EXE file, it sometimes
- crashes, reporting an error at line 0. My QuickBasic QB.EXE file is
- dated 09-28-88.
-
- The program cannot wake the dead. The designers of Postscript deliberately
- made it possible for applications to make changes to the printer that
- can only be undone by turning the printer off (like IBM computers, our
- QMS has no re-set switch).
-
- Most printers wake up expecting XON-XOFF protocol. If your printer
- requires different commands from a QMS to turn on hardware handshaking
- then you will have to edit the source. "What is wrong with XON-XOFF?"
- I hear you cry. Well the first version of this program was written using
- QuickBasic 4.0 and the XON-XOFF protocol in that compiler did not work.
- I never tested QB 4.5
-
- This has been used for several months now on an XT-clone connected
- to a QMS PS-800.
-
- The future:
- There are obviously many places where features could be added. If
- someone else actually uses this program and tells me and makes a
- suggestion, then I shall do something (who knows what).
-
- Comments, improvements etc can be sent to David Jeffrey
- Dept Applied Mathematics
- The University of Western Ontario
- London, Ontario, Canada N6A 5B9
- DJEFFREY@UWO.CA