Platforms to show: All Mac Windows Linux Cross-Platform
Back to NSPrintOperationMBS class.
NSPrintOperationMBS.canSpawnSeparateThread as boolean
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
property | Cocoa Printing | MBS MacCocoa Plugin | 12.4 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop, Console & Web |
canSpawnSeparateThread: True if the receiver is allowed to spawn a separate thread; otherwise, false.
If canSpawnSeparateThread is true, an NSThread object is detached when the print panel is dismissed (or immediately, if the panel is not to be displayed). The new thread performs the print operation, so that control can return to your application. A thread is detached only if the print operation is run using the runOperationModalForWindow:delegate:didRunSelector:contextInfo: method. If canSpawnSeparateThread is false, the operation runs on the current thread, blocking the application until the operation completes.
If you send setCanSpawnSeparateThread: to an NSPrintOperation object with an argument of true, then the delegate specified in a subsequent invocation of runOperationModalForWindow may be messaged in that spawned, non-main thread.
(Read and Write computed property)
NSPrintOperationMBS.Constructor
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.
See also:
NSPrintOperationMBS.Constructor(other as NSPrintOperationMBS)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Cocoa Printing | MBS MacCocoa Plugin | 12.4 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop, Console & Web |
If you have a NSPrintOperationMBS and you want to use printOperationDidRun event, you can initialize a subclass of NSPrintOperationMBS with your existing object to get the event there.
See also:
NSPrintOperationMBS.Constructor(view as DesktopHTMLViewer, printInfo as NSPrintInfoMBS = nil)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Cocoa Printing | MBS MacCocoa Plugin | 22.0 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
View: The view whose contents you want to print.
PrintInfo: The print settings to use when printing the view.
Returns the new NSPrintOperation object. You must run the operation to print the view.
This method raises an NSPrintOperationExistsException if there is already a print operation in progress; otherwise the returned object is made the current print operation for this thread.
See also:
NSPrintOperationMBS.Constructor(view as HTMLViewer, printInfo as NSPrintInfoMBS = nil)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Cocoa Printing | MBS MacCocoa Plugin | 14.4 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
View: The view whose contents you want to print.
PrintInfo: The print settings to use when printing the view.
Returns the new NSPrintOperation object. You must run the operation to print the view.
This method raises an NSPrintOperationExistsException if there is already a print operation in progress; otherwise the returned object is made the current print operation for this thread.
See also:
NSPrintOperationMBS.Constructor(view as NSViewMBS)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Cocoa Printing | MBS MacCocoa Plugin | 12.4 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
View: The view whose contents you want to print.
Returns the new NSPrintOperation object. You must run the operation to print the view.
The new NSPrintOperation object uses the settings stored in the shared NSPrintInfo object. This method raises an NSPrintOperationExistsException if there is already a print operation in progress; otherwise the returned object is made the current print operation for this thread.
See also:
NSPrintOperationMBS.Constructor(view as NSViewMBS, printInfo as NSPrintInfoMBS)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Cocoa Printing | MBS MacCocoa Plugin | 12.4 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
View: The view whose contents you want to print.
PrintInfo: The print settings to use when printing the view.
Returns the new NSPrintOperation object. You must run the operation to print the view.
This method raises an NSPrintOperationExistsException if there is already a print operation in progress; otherwise the returned object is made the current print operation for this thread.
See also:
NSPrintOperationMBS.context as NSGraphicsMBS
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Cocoa Printing | MBS MacCocoa Plugin | 12.4 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop, Console & Web |
NSPrintOperationMBS.currentPage 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 |
NSPrintOperationMBS.data as Memoryblock
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Cocoa Printing | MBS MacCocoa Plugin | 12.4 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop, Console & Web |
NSPrintOperationMBS.Destructor
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Cocoa Printing | MBS MacCocoa Plugin | 12.4 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop, Console & Web |
NSPrintOperationMBS.isCopyingOperation 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 |
True if the receiver is an EPS or PDF copy operation; otherwise, false.
NSPrintOperationMBS.jobTitle as string
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
property | Cocoa Printing | MBS MacCocoa Plugin | 12.4 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop, Console & Web |
A string containing the print job title. If set, this value overrides the title returned by the printing view.
Available in OS X v10.5 and later.
(Read and Write computed property)
NSPrintOperationMBS.pageOrder as Integer
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
property | Cocoa Printing | MBS MacCocoa Plugin | 12.4 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop, Console & Web |
The print order. For a list of possible values, see Constants.
(Read and Write computed property)
NSPrintOperationMBS.pageRange as NSRangeMBS
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 print order. For a list of possible values, see Constants.
NSPrintOperationMBS.preferredRenderingQuality 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 |
The preferred printing quality. See constants for the possible values.
If the print sheet is unresponsive or sluggish due to the time is takes to fully render a page, you can check this method in drawRect: and other printing methods such as beginDocument and knowsPageRage: to determine if the print operation prefers speed over fidelity. Most applications render each page fast enough and do not need to call this method. Only use this method after establishing that best quality rendering does indeed make the user interface unresponsive.
NSPrintOperationMBS.printInfo as NSPrintInfoMBS
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
property | Cocoa Printing | MBS MacCocoa Plugin | 12.4 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop, Console & Web |
(Read and Write computed property)
NSPrintOperationMBS.printPanel as NSPrintPanelMBS
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
property | Cocoa Printing | MBS MacCocoa Plugin | 12.4 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
(Read and Write computed property)
NSPrintOperationMBS.runOperation 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 |
Returns true if the operation was successful; otherwise, false.
The operation runs to completion in the current thread, blocking the application. A separate thread is not spawned, even if canSpawnSeparateThread is true. Use runOperationModalForWindow to use document-modal sheets and to allow a separate thread to perform the operation.
NSPrintOperationMBS.runOperationModalForWindow(win as DesktopWindow)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Cocoa Printing | MBS MacCocoa Plugin | 22.0 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
win: The document window to receive a print progress sheet.
Calls the printOperationDidRun event.
See also:
Some examples using this method:
NSPrintOperationMBS.runOperationModalForWindow(win as NSWindowMBS)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Cocoa Printing | MBS MacCocoa Plugin | 12.4 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
win: The document window to receive a print progress sheet.
Calls the printOperationDidRun event.
See also:
NSPrintOperationMBS.runOperationModalForWindow(win as window)
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Cocoa Printing | MBS MacCocoa Plugin | 12.4 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
win: The document window to receive a print progress sheet.
Calls the printOperationDidRun event.
See also:
NSPrintOperationMBS.showsPrintPanel as boolean
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
property | Cocoa Printing | MBS MacCocoa Plugin | 12.4 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop, Console & Web |
True if the operation displays a print panel; otherwise, false.
Operations that generate EPS or PDF data do no display a print panel (instance of NSPrintPanel), regardless of the value returned by this method.
(Read and Write computed property)
Some examples using this property:
NSPrintOperationMBS.showsProgressPanel as boolean
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
property | Cocoa Printing | MBS MacCocoa Plugin | 12.4 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop, Console & Web |
True if you want to display a progress panel; otherwise, false.
This method does not affect the display of a print panel; that operation is controlled by the ShowsPrintPanel method.
Operations that generate EPS or PDF data do no display a progress panel, regardless of the value in the flag parameter.
(Read and Write computed property)
Some examples using this property:
NSPrintOperationMBS.view as NSViewMBS
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | Cocoa Printing | MBS MacCocoa Plugin | 12.4 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop only |
The items on this page are in the following plugins: MBS MacCocoa Plugin.