Indy 9
TIdLPR
Hierarchy, Properties, Methods, Events, Unit: IdLPR
This class implements the Line Printer Daemon Protocol (LPR) as a client.
TIdLPR = class(TIdTCPClient)
Unit
IdLPR
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.

TIdLPR.ControlFile
TIdLPR, See Also
This is the control file for the current print job.
property ControlFile: TIdLPRControlFile;
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.

TIdLPR.JobId
TIdLPR, See Also
Identifies the current print Job ID number.
property JobId: String;
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.

TIdLPR.Queue
TIdLPR, See Also
This is the name of the print queue (spool) that is used with the GetQueueState, Print, and PrintFile.
property Queue: String;
Description
This is the name of the print queue (spool) that is used with the GetQueueState, Print, and PrintFile.

TIdLPR.Create
TIdLPR, See Also
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.


TIdLPR.Destroy
TIdLPR, See Also
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.

TIdLPR.GetQueueState
TIdLPR
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.

TIdLPR.Print
TIdLPR, See Also
This method sends text to the daemon for printing.
procedure Print(AText: String); overload;
procedure Print(ABuffer: array of Byte); overload;
Parameters
AText: String
a string to be printed
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.

TIdLPR.Print
TIdLPR, See Also
This method sends text to the daemon for printing.
procedure Print(AText: String); overload;
procedure Print(ABuffer: array of Byte); overload;
Parameters
AText: String
a string to be printed
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.

TIdLPR.PrintFile
TIdLPR, See Also
This sends a file to the daemon for printing.
procedure PrintFile(AFileName: String);
Parameters
AFileName: String
The file to be printed.
Description
PrintFile is a method used to send the contents of a file to the LPR daemon for printing.

TIdLPR.PrintWaitingJobs
TIdLPR, See Also
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.

TIdLPR.RemoveJobList
TIdLPR, See Also
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).

TIdLPR.OnLPRStatus
TIdLPR, See Also
This event is triggered to indicate the status of the TIdLPR object.
property OnLPRStatus: TIdLPRStatusEvent;
Parameters
ASender
the object that triggered this event
AStatus
The state of the TIdLPR queue
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.

Created with Doc-O-Matic 2 donated to Project JEDI. Commercial license available from the Doc-O-Matic site.