Changes to Printing system RISC OS 4.02 onwards
This file documents the changes made to the printing system for RISC OS 4.00. As far as possible, the changes are backwardly compatible.
Due to the design of the PDumper interface, the combined length of all the strings in use for a printer has to be less than 256 characters. This is further compounded by the need to hold flags in the string too.
This situation is then made even worse by the fact that the GSTransed version of the string (typically about twice length of the unGSTransed string) is manipulated in BASIC - hence roughly halving this length again.
To solve this problem, various changes have been put through the printing system:
Parallel Port Error Detection
A new feature has been added in the connections window. When you choose a parallel connection, you also get to choose whether or not the frontend should examine the error lines on the parallel port to check for error conditions.
Some (very) old printers may not provide these lines, some cables may not be fully wired, and some switchboxes etc may cause problems; hence the option to turn it off. This option defaults to off to continue the old behaviour.
External Config Apps
There has for a long time been a shortcut on !Printers whereby the configuration window can be opened by shift-clicking a printers icon.
Now, if a printers icon is ctrl-clicked !Printers checks for the existence of a system variable, of the form:
where name is the name given under the icon (with spaces, '<', '>' and other undesirable characters replaced by '_'). If this doesn't exist, it tries again with name replaced by the printer class (dp, lj etc).
If the alias exists, it is executed, followed by an 8 digit hex id number. If not, the config window is opened as usual. So if an Epson FX-80 PDF is installed, and the following alias is setup:
Set Alias$@PrinterConfigRun_FX-80 adfs::something.dir.!app
Then the following command line might be run:
This hex id can be used to identify the printer instantiation for which it was invoked, using Message_PrintInterrogate (below).
It is intended that this be used to trigger external configuration applications; for example Laserjets might have an application to set toner density/economode etc, inkjets might have nozzle clearing utilities etc.
Please note that it is the responsibility of the external application to ensure that only one copy is run at a time, and that if it is invoked twice to pop any existing windows to the top of the window stack.
New WIMP Message: Message_PrintConfigure
A new WIMP message 0x8014A (Message_PrintConfigure) has been implemented. It is intended that this be used by external applications to configure !Printers. Currently only one reason code is defined, but this may grow in future.
The message block is structured as follows:
All other reason codes are currently reserved.
New WIMP Message: Message_PrintInterrogate
A new WIMP message 0x8014B (Message_PrintInterrogate) has been implemented. It is intended that this be used by external configuration applications to read the state of a given printers setup. Currently only one reason code is defined, but this may grow in future.
The message block is structured as follows:
This message should be broadcast; if not replied to, then there is either no !Printers running, that printer instantiation no longer exists, or that class of printer does not support returning this information (DP and LJ do, PS does not).
When !Printers receives such a message, it will first ack it, and then send a reply back as follows:
External applications should watch for Message_SetPrinter (0x80147) being broadcast, and should re-read their settings on this.
Paper Feed/Bin control for non-PS printers
As from !Printers 1.90 onwards there is support for extending !Printers with knowledge of different paper feed/output bin settings.
!PrintEdit now allows a feed and a bin path to be added to a PDF (these should be left blank if not used). If present !Printers will examine the following directories for feed/bin information:
For feeds: Printers:<class>.Feeds.<feed-path> For bins: Printers:<class>.Bins.<bin-path>
Each of these directories should contain a series of files, each one corresponding to one feed option. Each file is of the format:
More lines in this "token: value" format may be added in future.
Consider for instance an HP2100 Laser printer. The following files in the directory Printers:lj.Feeds.HP.LJ2100 would offer the full set of feed options:
Clearly therefore these files need to be distributed with any PDF that refers to them. The correct way of doing this is to use the bundled PDF facility described below.
Furthermore these files should NOT be included inside !Printers itself (unless 'blessed' by RISC OS Ltd), but rather within the choices directory used by !Printers. If bundled PDFs are used this will happen automatically.
As a convention, the feeds and bins paths should follow the following format:
(or when released with !Printers through RISC OS Ltd)
Each component of the path should be kept to 10 characters or less.
For example "HP.LJ2100.Explan" is much preferable to simply "HP2100" for several reasons:
Bundled PDF format
It has often been necessary for people producing PDF files to supply new palette files or paper sizes for use with that PDF, traditionally with a ReadMe file telling users to install the papersizes/palettes first. With the introduction of paper feed and output bin options this situation is further exacerbated.
As from !Printers 1.90 onwards there is a new bundled PDF format that allows all this to be acheived with just one file.
Generating a bundled PDF is fairly simple; first create a PDF as normal. Next, create a directory containing any files that want to be in the bundled PDF with appropriate relative paths. For example, if LittleCo was preparing a bundled PDF for a BogoSet (laserjet compatible) laser printer from BigCorp they would make:
(Where all the files are text files, except PaperSize which is of type &FC6).
To bundle this all together run !PrtBundle, and click on the iconbar icon. Drag the PDF and the resources directory to the bundle window, and save out the bundled PDF to a new directory.
Dragging a bundled PDF to the icon bar icon will allow the resources directory and PDF to be separated for editing.
Advice on Paper Size Names
Due to a poor design decision historically within !Printers, paper size names have some significance with the LaserJet driver. (It bases the paper size request in the output file on the name given to the paper size by the user). For this reason names should be chosen to be of the form:
<Standard Size Name> (<Extra description>)
For instance: "A2 (HP2100 - Full bleed)" is a good name, whereas "A2+" or "Full bleed A2 for HP2100" are not.