pyILPER

HP2225B Tab

Description

This virtual HP-IL device emulates a HP2225B ThinkJet printer.

HP-IL configuration:

Accessory ID0x23
Default Address5
Device IDHP2225B

This virtual HP-IL device emulates a HP2225B ThinkJet printer and creates an approximated output of the real device. The formatted printer output is sent to a scrollable output window. The buffer size of the output window is configurable to keep up to 50 pages of graphics or text. The content of this buffer can be transferred to a high quality PDF file in the following way:

  • Push the Clear button to clear the printer output window. Note: this also resets your printer settings
  • Print a document on the printer. The formatted output is shown in the printer output window which can be scrolled.
  • Generate a PDF file from the content of the scollable printer output window.

Note: Form feeds are not visible in the printer output window. However they create corresponding page breaks in the PDF file.

Differences compared to the real device

The HP2225B printer emulator differs from the original device as follows:

  • The HP2225B printer bitmap font is emulated with a monospaced outline font. Character sizes are close to the character sizes of the original printer.
  • Graphics dots are generated as squares. Therefore graphic lines are less smooth and less solid in comparison with the original printer output.
  • Printable output is generated as PDF file. The page size is limited to the dimensions of either the Letter or the A4 format which is specified in the pyILPER system settings. Therefore the control codes for page length and perforation skip have no effect.
  • The maximum horizontal size of the text area is 10 inches, which is equivalent to 80 lines at 8 lines/inch or 60 lines at 6 lines/inch. The text length can be changed within these limits. A smaller text area is vertically centered in the PDF file. Note: The PDF file is generated only with the endmost text length setting!.
  • The HP-IL printer status bytes always return the condition "ready to receive data" because the error conditions of the real device do not apply to the emulator.
  • THe emulator never sends NRD messages because the buffer size is not limited.
  • The control codes for selftest or bidirectional printing have no effect.

Issues

  • On macOS stretched characters do not render correctly. This seems to be a problem with the Qt version for this operating system. As a work around the expanded font is displayed with unstretched characters but the correct character spacing.
  • The alternate controls mode is not implemented. The emulator ignores all data in this mode.

Device controls

The HP2225B printer tab has the following controls:

  • Clear: Resets the device in the same way as a HP-IL device clear. The scrollable output window is cleared and the emulated printer is put to a default condition.
  • LF: Does a line feed on the printer. If the button is pushed for more than half a second multiple line feeds are generated until the button is released.
  • FF: Does a form feed on the printer.
  • PDF: Generate a PDF file with the content of the printer output window.
  • Device enabled checkbox: If checked, the virtual HP-IL printer is available and can be used as HP-IL device. The HP-IL loop must always be reconfigured after activation or deactivation.
  • Log HP2225B checkbox: Activates writing printer output to the file Devicename.log in the pyILPER working directory. Output is always appended to that file. A time stamp in the file marks the start and the end of each logging. The log file is closed automatically on program termination. Note: only printable text is logged to the file.

Tab configuration menu

  • Screen width: Set the width of the scrollable output window to either 640, 960 or 1280 pixel. A higher value scales up the presentation of text and graphics. Thus the content of the printer output window becomes more readable on small high resolution displays. If Default is selected, the setting of the pyILPER configuration is used.
  • Buffer size: Size of the scrollable output window in pages (approximately). Note: Changing this setting clears the printer output window.
  • Print color: Select black, red, blue or green color to emulate the color ink cartridges which were available for that device. Changing this setting affects the whole scrollable output window immediately.
  • Log buffering: enable or disable buffering of the log file. If log buffering is off the log file output is flushed to disk after an end of line was encountered. This enables watching the log file output but may decrease the execution speed of pyILPER considerably.