| | 1 | = Printing in HelenOS = |
| | 2 | |
| | 3 | 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. |
| | 4 | |
| | 5 | == Hadware setup == |
| | 6 | |
| | 7 | You need a PC with standard PC parallel port at 0x378 or 0x278. USB-parallel dongle will not work. |
| | 8 | |
| | 9 | Qemu can be configured with parallel port emulation |
| | 10 | * 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}}} |
| | 11 | * 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}}}. |
| | 12 | |
| | 13 | == Software configuration and usage == |
| | 14 | |
| | 15 | To check whether your system has any printer ports: |
| | 16 | |
| | 17 | {{{ |
| | 18 | / # loc show-cat printer-port |
| | 19 | printer-port: |
| | 20 | devices/\hw\sys\00:01.0\lpt1\a : devman |
| | 21 | / # |
| | 22 | }}} |
| | 23 | |
| | 24 | The {{{lprint}}} utility allows printing files or short messages. The {{{-d}}} option can be |
| | 25 | used to pass the device which should be used for printing. The option can be omitted in which |
| | 26 | case it will print to the default printer (currently the default printer selection is arbitrary and |
| | 27 | cannot be configured). |
| | 28 | |
| | 29 | To print a short message: |
| | 30 | |
| | 31 | {{{ |
| | 32 | / # lprint -m Hello world! |
| | 33 | }}} |
| | 34 | |
| | 35 | To print a file: |
| | 36 | {{{ |
| | 37 | / # lprint demo.txt |
| | 38 | }}} |
| | 39 | |
| | 40 | (Most printers probably don't accept UTF-8, though). |
| | 41 | |
| | 42 | {{{#!box type=note |
| | 43 | 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. |
| | 44 | }}} |