Platforms to show: All Mac Windows Linux Cross-Platform
Back to NSPrinterMBS class.
NSPrinterMBS.booleanForKey(key as string, table as string) as boolean
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Cocoa Printing | MBS MacCocoa Plugin | 12.4 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop, Console & Web |
key: The key whose value you want.
table: The name of a table from the printer's PPD file.
Returns the Boolean value associated with the key. Returns false if the key is not in the table or the receiver lacks a PPD file.
NSPrinterMBS.Constructor(name as string = "")
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Cocoa Printing | MBS MacCocoa Plugin | 12.4 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop, Console & Web |
On success the handle property is not zero.
Name can be empty to pick default printer. Else pass name of printer.
NSPrinterMBS.copy as NSPrinterMBS
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Cocoa Printing | MBS MacCocoa Plugin | 12.4 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop, Console & Web |
NSPrinterMBS.deviceDescription as Dictionary
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Cocoa Printing | MBS MacCocoa Plugin | 12.4 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop, Console & Web |
A dictionary of the device properties. See NSGraphics.h for possible keys. The only key guaranteed to exist is NSDeviceIsPrinter.
NSPrinterMBS.floatForKey(key as string, table as string) as Double
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Cocoa Printing | MBS MacCocoa Plugin | 12.4 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop, Console & Web |
key: The key whose value you want.
table: The name of a table from the printer's PPD file.
Returns the floating-point value. Returns 0.0 if the key is not in the table or the receiver lacks a PPD file.
NSPrinterMBS.intForKey(key as string, table as string) as Integer
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Cocoa Printing | MBS MacCocoa Plugin | 12.4 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop, Console & Web |
key: The key whose value you want.
table: The name of a table from the printer's PPD file.
Returns the integer value. Returns 0 if the key is not in the table or the receiver lacks a PPD file.
NSPrinterMBS.isKey(key as string, table as string) as boolean
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Cocoa Printing | MBS MacCocoa Plugin | 12.4 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop, Console & Web |
key: The key whose value you want.
table: The name of a table from the printer's PPD file.
Returns true if the key is in the table; otherwise, false.
NSPrinterMBS.languageLevel as Integer
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Cocoa Printing | MBS MacCocoa Plugin | 12.4 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop, Console & Web |
Returns the PostScript language level. The value is 0 if the receiver is not a PostScript printer.
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Cocoa Printing | MBS MacCocoa Plugin | 12.4 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop, Console & Web |
NSPrinterMBS.pageSizeForPaper(paperName as string) as NSSizeMBS
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Cocoa Printing | MBS MacCocoa Plugin | 12.4 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop, Console & Web |
paperName: Possible values are printer-dependent and are contained in the printer's PPD file. Typical values are "Letter" and "Legal".
Returns the size of the page, measured in points in the user coordinate space. The returned size is zero if the specified paper name is not recognized or its entry in the PPD file cannot be parsed.
NSPrinterMBS.rectForKey(key as string, table as string) as NSRectMBS
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Cocoa Printing | MBS MacCocoa Plugin | 12.4 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop, Console & Web |
key: The key whose value you want.
table: The name of a table from the printer's PPD file.
Returns the rectangle value. Returns NSRectMBS.Zero if the key is not in the table or the receiver lacks a PPD file.
NSPrinterMBS.sizeForKey(key as string, table as string) as NSSizeMBS
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Cocoa Printing | MBS MacCocoa Plugin | 12.4 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop, Console & Web |
key: The key whose value you want.
table: The name of a table from the printer's PPD file.
Returns the size value. Returns NSZeroSize if the key is not in the table or the receiver lacks a PPD file.
NSPrinterMBS.statusForTable(paperName as string) as Integer
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Cocoa Printing | MBS MacCocoa Plugin | 12.4 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop, Console & Web |
table: The name of a table from the printer's PPD file.
Returns one of the return values described in Constants.
NSPrinterMBS.stringForKey(key as string, table as string) as string
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Cocoa Printing | MBS MacCocoa Plugin | 12.4 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop, Console & Web |
key: The key whose value you want.
table: The name of a table from the printer's PPD file.
Returns the value for the specified key, or nil if the key is not in the table. The returned string may also be empty.
If key is a main keyword only, and if that keyword has options in the PPD file, this method returns an empty string. Use stringListForKey to retrieve the values for all occurrences of a main keyword.
NSPrinterMBS.stringListForKey(key as string, table as string) as string()
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Cocoa Printing | MBS MacCocoa Plugin | 12.4 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop, Console & Web |
key: The key whose value you want.
table: The name of a table from the printer's PPD file.
Returns an array of strings, each containing a value associated with the specified key. Returns nil if the key is not in the table.
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Cocoa Printing | MBS MacCocoa Plugin | 12.4 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop, Console & Web |
The items on this page are in the following plugins: MBS MacCocoa Plugin.