PrinterInfo

Description:

baPrinterInfo returns information about the installed printers.

Platforms:

Windows

Usage:

Result = baPrinterInfo( Info )

Arguments:

String.
Info is the type of information required. Can be:

"installed" 

returns full list of installed printers, drivers and ports

"list" 

list of the names of installed printers

"default" 

the current default printer

"orientation" 

the orientation of the default printer

"paper" 

the current paper size of the default printer

"papers" 

the list of paper sizes supported by the default printer

"papername" 

the name of the current paper of the default printer

"papernames" 

the list of paper names of the default printer

"paperlength" 

the length of the paper in the default printer in 1/1000 mm

"paperwidth" 

the width of the paper in the default printer in 1/1000 mm

"copies" 

the number of copies to print

Returns:

Depends on Info type.
"installed", "list", "papers", "papernames" return a list;
"default", "orientation", "paper", "papername" return a string;
"paperlength", "paperwidth" and "copies" return an integer.

Examples:

Director:
printer = baPrinterInfo( "default" )

Authorware:
printerList := baPrinterInfo( "list" )
 

Notes:

The "installed" info type returns a list - one list element for each printer. Each element will consist of the printer name, then the driver, then the port, all separated by commas. eg.

["EPSON Stylus COLOR 400,EPS400,LPT1:", "Acrobat PDFWriter,PDFWRITR,DISK:"]

The "list" Info type returns a list with just the printer names. eg

["EPSON Stylus COLOR 400", "Acrobat PDFWriter"]

The "orientation" Info type will return "Landscape", "Portrait" or "Unknown".

The "paper" Info type returns the size of the selected paper. It will be one of the following values:

"Letter", "LetterSmall", "Tabloid", "Ledger", "Legal", "Statement", "Executive", "A3", "A4", "A4Small", "A5", "B4", "B5", "Folio", "Quarto", "10x14", "11x17", "Note", "Envelope9", "Envelope10", "Envelope11", "Envelope12", "Envelope14", "CSheet", "DSheet", "ESheet", "EnvelopeDL", "EnvelopeC5", "EnvelopeC3", "EnvelopeC4", "EnvelopeC6", "EnvelopeC65", "EnvelopeB4", "EnvelopeB5", "EnvelopeB6", "EnvelopeItaly", "EnvelopeMonarch", "EnvelopePersonal", "FanFoldUS", "FanFoldStdGerman", "FanFoldLegalGermany", "User", "Unknown".

The "papers" info type returns a list of the paper sizes supported by the default printer.

The "papername" type returns the name of the selected paper as shown by the printer driver.

The "papernames" type returns a list of the papers supported by the default printer, as listed by the printer driver.

The "paper" option uses paper sizes pre-defined by Windows. Printer drivers may define their own page sizes and names - if the selected paper is a printer-defined size, the function will return "Unknown".

The "papername" will return the name of the paper as displayed by the printer driver - this will be the name the user sees in printer setup dialog boxes.
 

See also:

baSetPrinter
baPrintDlg