Reference Guide :
The PRINTER unit.
Michaël Van Canneyt
Abstract:
This document describes the PRINTER unit for FPK Pascal. It was written for
LINUX by Michaël Van Canneyt. It works only on LINUX systems.
The document is divided in 2 sections:
- The first section lists types, constants and variables from the
interface part of the unit.
- The second section describes the functions defined in the unit.
Lst : this is the standard printing device.
Lst is set up using AssignLst('/tmp/PID.lst').
You can change this behaviour at compile time, setting the DefFile constant.
Procedure AssignLst ( Var F : text; ToFile : string[255]) ;
Assigns to F a printing device. ToFile is a string with the following form:
- '|filename options' : This sets up a pipe with the program filename,
with the given options, such as in the popen() call.
- 'filename' : Prints to file filename. Filename can contain the string 'PID'
(No Quotes), which will be replaced by the PID of your program.
When closing lst, the file will be sent to lpr and deleted.
(lpr should be in PATH)
- 'filename|' Idem as previous, only the file is NOT sent to lpr, nor is it
deleted.
(useful for opening /dev/printer or for later printing)
Errors are reported in Linuxerror.
lpr(1)
Michael Van Canneyt
Thu Dec 12 15:47:48 MET 1996