wiki:UsersGuide/Printing

Printing in HelenOS

Rudimentary printing support was introduced in HelenOS 0.8.0. There is now a standard PC parallel port driver (pc-lpt) and the system will detect standard printer ports at addresses 0x378 and 0x278.

Hadware setup

You need a PC with standard PC parallel port at 0x378 or 0x278. USB-parallel dongle will not work.

Qemu can be configured with parallel port emulation

  • To redirect emulated parallel port output to a file on the host you can use -device isa-parallel,chardev=foo -chardev file,id=foo,path=/tmp/myfile.txt
  • To redirect emulated parallel port to a real parallel port on the host you can use -device isa-parallel,chardev=foo -chardev parallel,id=foo,path=/dev/lpN.

Software configuration and usage

To check whether your system has any printer ports:

/ # loc show-cat printer-port
printer-port:
	devices/\hw\sys\00:01.0\lpt1\a : devman
/ # 

The lprint utility allows printing files or short messages. The -d option can be used to pass the device which should be used for printing. The option can be omitted in which case it will print to the default printer (currently the default printer selection is arbitrary and cannot be configured).

To print a short message:

/ # lprint -m Hello world!

To print a file:

/ # lprint demo.txt

(Most printers probably don't accept UTF-8, though).

There is no actual configuration or driver for the printer. You need to send data that the printer can understand. Most printers will accept ASCII or ISO-8859-1 plain text. Some printers may accept PostScript.

Last modified 5 years ago Last modified on 2018-12-11T13:22:59Z
Note: See TracWiki for help on using the wiki.