IGxPrinterDescription.Name

Syntax

Name: String;

Description

The Name property determines the name of the printer.

Example

Sub Main;

Var

MB: IMetabase;

Printer: IGxPrinter;

DocPrint: IGxDocumentPrinter;

PrComment: IGxPrintComment;

PrDesc: IGxPrinterDescription;

Docum: IGxDocument;

s: String;

Begin

MB:=MetabaseClass.Active;

Docum:=MB.ItemById("Report").Bind As IGxDocument;

Printer:=GxPrinters.DefaultPrinter;

DocPrint:=Printer As IGxDocumentPrinter;

PrComment:=New GxPrintComment.Create;

Docum.Print(DocPrint,0,0,"");

PrDesc:=PrComment.PrinterDescription;

PrDesc.Description:=DocPrint.Description;

s:=PrDesc.Name;

End Sub Main;

After executing the example the document is printed, and the "s" variable contains the name of the printer installed in the operating system by default.

See also:

IGxPrinterDescription