Driver: String;
The Driver property determines the driver of the printer.
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.Driver;
End Sub Main;
After executing the example the document is printed, and the "s" variable contains the driver of the printer installed in the operating system by default.
See also: