Just a quick update - I have written (in conjunction with Joachim), a brief design specification for this project.

The spec is set out below and we would welcome your comments (or offers of help in taking this forward).

Outline of a Proforma Filter Driver v1.0 24/11/04
=================================================

Overview
--------
The QL (in common with many older computer systems) faces a severe problem when sending output to a
modern printer.


Many modern printers are GDI printers, designed with the premise that they will only have to work
with modern Microsoft Windows based operating systems. As a result a lot of printers can only handlle
graphics output and expect the operating system to take text output and convert it to graphics, before
sending this to the printer.


The QL cannot do this - many programs expect to be able to send text output direct to the parallel or
serial port and for the printer to cope with this directly. Unfortunately, the number of printers which
can do this is fast diminishing - Epson currently only make one inkjet printer which will handle plain
text, the 1520 which is an A3 wide printer.


The idea of the Proforma Filter driver is to provide all forms of the QL with a means of sending output
to modern GDI printers without requiring too much effort on the users part, and without forcing the user
to switch to using different programs on the QL.


Proforma is a well respected program which already creates graphical only output for a wide range of
printers, and supports proportional fonts as well as different print qualities. It is therefore intended
that the Proforma Printer Filter should make use of this excellent utility to handle the actual output
to modern printers.


It is also envisaged that further functionality could be added to the driver, by creating a FILTER program
which can create Postscript output. The QL can then print Postscript output using the public domain
Ghostscript program instead of using Proforma.


The Proforma Filter Driver will consist of four layers:
- The FILTER Device (PFF device)
- The FILTER THING (this forms the main printer control engine)
- Various FILTER Programs
- The Printer program itself (Proforma or Ghostscript)


Implementation
--------------
1) There will be a new PFF device driver. This could be set using a PFF_USE command to replace
either the exsiting SER or PAR driver, meaning that programs could print to this device without
any changes.


2) The PFF device format is:
PFF[<printer>][<intermediate type>]
<printer> and <intermediate type> would default to that configured within the FILTER THING
PFF1 - Output to Printer number 1 - default intermediate protocol
PFF2e - Output to Printer number 2 - Epson intermediate protocol
PFFa - Output to default Printer - ASCII intermediate protocol
PFF1n - Output to Printer number 1 - native Proforma intermediate protocol


3) The PFF device accepts text and control codes for printing. It contacts the FILTER THING to
check whether the requested printer and intermediate protocol are supported.


If the requested printer is available and the intermediate protocol supported, then the FILTER
THING will provide the PFF device with a channel id where the data needs to be output.
Dependant upon the configuration of the PRINTER THING, this may be a PIPE or a temporary file.
The PFF device will report an error if the output cannot be sent for some reason.


4) The FILTER THING would expect two parameters - the printer number and the intermediate type
(ie. the type of code being sent by the PFF device - this may be EPSON compatible output or
PLAIN ASCII). The default printer would be 1 and the default intermediate protocol is user
configurable within the FILTER THING.
As to whether the FILTER THING can support the given intermediate type will depend upon the
Printer Filters installed on the system.
When the FILTER THING does not know the requested intermediate protocol type, it will return an
error, which should be returned by the PFF device.
The FILTER THING can also be configured to match the physical printers with the printer number
and also to specify the type of printer used (ESC/P, ESC/P2, Postscript, HP, IBM etc)


5) A series of Printer Filters.
These will need to register themselves with the FILTER THING when they are initialised, in
order that the FILTER THING will know which intermediate protocol types are supported.
The Printer Filters will need to check with the FILTER THING on a regular basis to check whether
there is a print job waiting in the queue in the supported intermediate protocol.
If there is, they will need to open an input channel to the device specified by the FILTER
THING (either a pipe or a temporary file) and then use translations to convert the data
to a format understood by Proforma (and / or Ghostscript) and then call that program for
actual printing of the converted data.


The native Proforma intermediate protocol Printer Filter would allow commands such as:
rgb 100 0 0
l 0 0 100 50
f Courier New
fs 10
o 200 10
t Something to print
p


Which would mean
- choose colour with 100% red, 0% green 0% blue (this colour is also knwon as "red"
- draw a line from (0,0) to (100,50). The writer of the filter job should determine (and fix)
whether this is in pt, mm or whatever.
- choose font names "Courier New"
- choose font size 10
- set origin to (200,100)
- write out text "Something to print", this will be in red, at given origin, in Courier New at
font size 10, as these are the values set before.
- emit the page


In general, all PROforma commands should get their respective command, and maybe some
combinations as shorthands. Then including vector and bitmap graphics, full support of fonts
and font sizes would also be usable by other programs.


Rich Mellor
Joachim Van der Auwera
Wolfgang Lenerz


-- Rich Mellor RWAP Services 26 Oak Road, Shelfield, Walsall, West Midlands WS4 1RQ

http://www.rwapservices.co.uk/

_______________________________________________
QL-Users Mailing List
http://www.q-v-d.demon.co.uk/smsqe.htm

Reply via email to