TIdLPR
This class implements the Line Printer Daemon Protocol (LPR) as a client.
Unit
Description
This class implements the Line Printer Daemon Protocol (LPR) as a client. The protocol is used to add, remove, and get the status of print jobs from a spool on a remote computer. This protocol was developed around the Berkeley version of Unix and later formalized in RFC 1179.
This is the control file for the current print job.
Description
This is the control file for the current print job. The control file specifies the parameters for the print job and is sent when a request is sent to the LPR daemon.
Identifies the current print Job ID number.
Description
JobId is a String property that identifies the print Job Identification number for LPR print job. Changing the value in JobID insures that JobID is less than 999. Values greater than or equal to 999 are ignored, and reset to 1 when the print job is generated. JobID is sent as a parameter to the
OnLPRStatus event handler.
Description
This constructor creates the
TIdLPR object.
constructor Create(AOwner: TComponent); override;
Description
Create
This constructor creates the TIdLPR object, sets the port to IdPORT_LPD, sets the BoundPortMin to 721, and sets BoundPortMax to 731. Create also sets the default value for Queue and JobId.
Frees the object instance.
destructor Destroy; override;
Description
Destroy is the destructor for the
TIdLPR object instance. Destroy frees resources allocated in the
ControlFile property prior to calling the inherited Destroy method.
This method requests that the server
send the status of print jobs in a spool.
function GetQueueState(const AShortFormat: Boolean = false; const AList: String = ''): String;
Parameters
const AShortFormat: Boolean = false
This parameter indicates if the daemon should
send an abbreviated listing.
Return Value
String - the status of the print jobs from the server.
Description
This method requests that the server
send the status of print jobs in a spool.
This method sends text to the daemon for printing.
procedure Print(AText: String); overload;
procedure Print(ABuffer: array of Byte); overload;
Parameters
AText: String
ABuffer: array of Byte
An array of characters to print
Description
Print is a method used to
send output text to the LPR daemon for printing.
This method sends text to the daemon for printing.
procedure Print(AText: String); overload;
procedure Print(ABuffer: array of Byte); overload;
Parameters
AText: String
ABuffer: array of Byte
An array of characters to print
Description
Print is a method used to
send output text to the LPR daemon for printing.
This sends a file to the daemon for printing.
procedure PrintFile(AFileName: String);
Parameters
AFileName: String
Description
PrintFile is a method used to
send the contents of a file to the LPR daemon for printing.
This method requests that the server print all of the print jobs that are waiting in the queue.
procedure PrintWaitingJobs;
Description
This method requests that the server print all of the print jobs that are waiting in the queue specified by the
TIdLPR.Queue property.
This requests that the daemon remove a list of jobs from its queue.
procedure RemoveJobList(AList: String; const AAsRoot: Boolean = False);
Parameters
AList: String
a list of print job numbers from the person specified in the ControlFile.UserName property or if the AsRoot parameter is true, this can be the UserNames whose jobs are to be deleted
AsRoot
If this parameter is true, the AList parameter can be this can be the UserNames whose jobs are to be deleted. If false, the only jobs that can be deleted are for the user specified in the ControlFile.UserName property. The root account is the system administrator or Unix Super User.
Description
This requests that the daemon remove a list of jobs from its queue (specified in the
Queue property).
This event is triggered to indicate the status of the
TIdLPR object.
Parameters
ASender
the object that triggered this event
AStatus
AStatusText
The JobID, an error message if AStatus equals psError, or the queue results if AStatus equals psQueueState.
Description
This event is triggered to indicate the status of the
TIdLPR object.