HPMan V1.0: An HP Manipulator A program to manipulate settings and fonts on HP LaserJet+ printers and compatibles. By Steve Robb 9 Epsom Ave Auckland 3 New Zealand Ph N.Z. (9)608-871 Description: This program occupies approximately 33700 bytes on disk, and uses 36500 bytes of memory. It is intended occupy the title bar of the workbench. It can be run from CLI or Workbench. Background: After more than a year of fiddling with basic programs and batch files written with Scribble! and trying to remember the commands necessary with JetSet, I was rather frustrated. I especially wanted a program that looked like an Amiga program i.e. pull-down menus, requesters etc. I haven't found any programs like that yet, hence this attempt. It was my initial intention to write a program that would simply download fonts. However, once that module was written, the basis of a more generally useful program was there to be used with very little extra memory overhead. A look through the PCLPak manual (that came with a set of soft fonts) was some help. (If you wonder why the menus are arranged the way they are, their basic organisation was derived from this manual - one day I will tidy up the menus into a more orderly arrangement - any ideas?) Acknowledgements to: ­ Kevin Lee Claque, Randy Finch, Martin Hash for `FileRequest()' I have modified the version (Aug 87) to remove the changes to screen colours while the requester is displayed as this played havoc with my eyes in interlace display. ­ Lattice for v4.0 ­ Fred Fish for all the public domain stuff from which I learned `C' ­ WordPerfect - this file was created with the best wordprocessor so far available for the Amiga, the source code was written with ProgramEdit from WordPerfect. Program Use: I think the program is mostly self explanatory. But for those of you who don't have the benefit of the reference manual that came with the REAL LaserJet (as opposed to all the copies), some explanations are included below. The program only uses the facilities available in the LaserJet. It does save hopping up and down to press buttons on the front of the printer, and it does save having to remember all the escape sequences yourself. PROJECT Menu: About just in case someone removed the readme files Save Settings - saves the current settings for later retrieval Load Settings - loads and sets the last saved settings FONTS Menu: Download font - each font sent to the printer is given an ID number. The ID number can be anything between 0 and 32767. The LaserJet's limits are a maximum of 32 fonts resident in the printer at one time, and (for the LaserJet+ at least), a maximum of 10 fonts used per page. This program limits the range of font ID's to between 1 and 20. The font ID # 0 is reserved for macro's (see later). Note that the font ID # is automatically incremented just before the Download requester is displayed. All this means is that if you want to overwrite a font, say font #6, then you should set the font ID to #5 before calling the download sequence. Simple eh! Font ID - to select any number between 0 & 20. See note above. Delete font - will delete the numbered font range 1-20. Delete All fonts - will delete all the fonts, whether they be temporary or permanent, as opposed to the Reset function which will only delete temporary fonts Select Font - a nearly useless function. However, the font you select would become the font used by the PRT: device when that is set for proportional mode. Note that this selection is reset every time you call the Print Sample function below. If there is enough demand, I will put in some code to preserve the selected font ID. Print Sample Last font - prints a range of USASCII and extended ASCII characters to show off the font you last downloaded OR the font using the current ID (selected by Font ID above). You must eject the page yourself for this - I opted this way deliberately to allow a range of fonts on one page. All fonts - prints a single line of characters for each font, just so that you know what you have selected. Make Permanent - will make the font with the current ID permanent. Permanent fonts will survive resets (but not Delete ALL Fonts or power-offs). Font Report - this will make a written report the attributes of a soft font. In particluar, the report will note the style (upright vs italic), weight (bold vs normal), spacing (proportional vs fixed), orientation (portrait vs landscape), point size, pitch, typeface, and others. Note that values of these attributes are derived from the font descriptor at the beginning of the font file. Some fonts, notably JetSet fonts, do not completely follow the standard font descriptor format and may cause confusion. FILE MANAGEMENT Menu: Copy file - will copy a file to the current output device. Note that this can cause problems in certain circumstances. If you have selected the PRT: device as the current output device, copy files containing HP specific escape sequences will just print garbage. Escape sequences for the PRT: device will print garbage if sent directly to the LaserJet via PAR: or SER:. Know what you are sending!! Destination - default is the PAR: device (my LaserJet+ is connected to the parallel port - it is much faster than the serial port!!!). If your printer is connected to the serial port then use this menu to change it. The PRT: device is for downloading simple ASCII code to the printer, such as source code, ED files etc. I will next be working on the code to allow the creation of disk files. This would allow the creation of macro's, or groups of fonts that can be downloaded all at once rather than having to download each font individually. Currently, I have limited use for this facility, so this has been a low priority. PRINTER SETTINGS Menu: (These save having to reach over to the printer to select functions) Orientation - to select either portrait (default) [across the page] or landscape [along the page] mode. Paper Source - selects either the internal tray (default), manual sheet feeder or envelope settings. Lines per Page - printer defaults depend on paper tray fitted. 66 lines for an A4 page, 60 lines for letter size pages (foolscap - who uses foolscap ?). Lines Per Inch - actually the LaserJet is capable of a greater range of line spacings than the limited ones shown, but this arrangement gives the simplest execution or the user. If you want to use other line spacings (0.5mm [1/48 inch] increments are allowed) wait for the next version of this program. Left Margin - default is 0, maximum is the current right margin setting Right Margin - default is right-most printable limit of page, minimum value allowed is the current left margin setting. Number of Copies - range 1 (default) to 99. The LaserJet is not known for its speed at accepting graphics. But it can print at 8 pages per minute once the data is downloaded over. Note that programs such as DeluxePaint and CityDesk send a reset before printing. This prevents you from printing multiple copies (shame, shame!!). Auto Line Wrap - default is for this to be off. Beware, if this is on, it can muck up your text displays. Line Termination - sets the printers interpretation of , , and
. Reset (Defaults) - resets all but the permanent fonts. OTHER Menu: Form Feed - ejects a page if there is any data on it. Position Cursor - to position the `cursor' in units of: a) centimetres (cm) b) inches for those countries that don't like to keep up with the times c) dots - 300 per inch, 120 per cm d) decipoints - 720 per inch, 288 per cm e) row and column Rules - will allow lines, grey scales etc to be printed. Wait for next version. Download overlays - any previously designed overlays can be copied and activated. The overlay is cancelled by selecting the `CANCEL' gadget of the requester. Notes: 1.The menus FONTS, PRINTER SETTINGS, and OTHER will not allow data to be sent to the PRT: device. This is to prevent HP specific escape sequences from confusing the PRT: device. Data is automatically rerouted through the PAR: device instead of PRT:. Rerouting will not occur if the current output device is PAR:, SER:, or a disk file. 2.The program cannot tell what you have selected for the various settings previously, or what other programs have modified the settings to. It presumes that it is the only one with control over the printer settings. 3.BUGS are in there. The menu checkmarks are not reset to the defaults on RESET. Currently the program doesn't check to see that the printer is actually on line. If the program appears to `hang', check the printer is turned on, and is on line. Other bugs there may be, but I think the worst person to find bugs is the person who wrote the code. I can't crash the program, and apart from the problems mentioned above, I can't see any other bugs. But if you do find some, PLEASE let me know. 4.All commands used by this program conform to HP's Printer Command Language. So HPMan should also be able to control compatible printers such as the HP DeskJet, Star LaserWriter etc. However, as I only own an HP LaserJet+, I can make no guarantees as to the performance of this program on anything other than a LaserJet+. 5.This program is copyright to Steve Robb. Permission is given to distribute the program freely by any means as long as the readme files are also included, and as long as those who make use of the program send $US10.00 to me at the above address, or their own SHAREWARE software as a swap (especially if their shareware relates to the LaserJet). Steve Robb 13 July, 1988