Platforms to show: All Mac Windows Linux Cross-Platform

Back to NSPrinterMBS class.

NSPrinterMBS.defaultPrinter as NSPrinterMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Cocoa Printing MBS MacCocoa Plugin 12.4 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
Returns the default printer.
Example
dim p as NSPrinterMBS = NSPrinterMBS.defaultPrinter
MsgBox p.name

NSPrinterMBS.printerNames as string()

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Cocoa Printing MBS MacCocoa Plugin 12.4 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
Returns the names of all available printers.
Example
MsgBox Join(NSPrinterMBS.printerNames, EndOfLine)

An array of strings, each of which contains the name of an available printer.
The user constructs the list of available printers using the Print Center application.

Some examples using this method:

NSPrinterMBS.printerTypes as string()

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Cocoa Printing MBS MacCocoa Plugin 12.4 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
Returns descriptions of the makes and models of all available printers.

An array of strings, each of which contains the make and model information for a supported printer.

NSPrinterMBS.printerWithName(name as string) as NSPrinterMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Cocoa Printing MBS MacCocoa Plugin 12.4 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
Creates and returns an NSPrinter object initialized with the specified printer name.

name: The name of the printer.

Returns an initialized NSPrinter object, or nil if the specified printer was not available.

Some examples using this method:

NSPrinterMBS.printerWithType(type as string) as NSPrinterMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Cocoa Printing MBS MacCocoa Plugin 12.4 ✅ Yes ❌ No ❌ No ❌ No Desktop, Console & Web
Creates and returns an NSPrinter object initialized to the first available printer with the specified make and model information.

type: A string describing the make and model information. You can get this string using the printerTypes method.

Returns an initialized NSPrinter object, or nil if the specified printer was not available.

The items on this page are in the following plugins: MBS MacCocoa Plugin.


The biggest plugin in space...