Platforms to show: All Mac Windows Linux Cross-Platform
NSPrintOperationMBS class
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
class | Cocoa Printing | MBS MacCocoa Plugin | 12.4 | ✅ Yes | ❌ No | ❌ No | ❌ No | Desktop, Console & Web |
An NSPrintOperation object works in conjunction with two other objects: an NSPrintInfo object, which specifies how the code should be generated, and an NSView object, which generates the actual code.
It is important to note that the majority of methods in NSPrintOperation copy the instance of NSPrintInfo passed into them. Future changes to that print info are not reflected in the print info retained by the current NSPrintOperation object. All changes should be made to the print info before passing to the methods of this class.
- event printOperationDidRun(success as boolean)
- 8 properties
- property Handle as Integer
- property canSpawnSeparateThread as boolean
- property jobTitle as string
- property pageOrder as Integer
- property printInfo as NSPrintInfoMBS
- property printPanel as NSPrintPanelMBS
- property showsPrintPanel as boolean
- property showsProgressPanel as boolean
- 18 methods
- method Constructor
- method Constructor(other as NSPrintOperationMBS)
- method Constructor(view as DesktopHTMLViewer, printInfo as NSPrintInfoMBS = nil)
- method Constructor(view as HTMLViewer, printInfo as NSPrintInfoMBS = nil)
- method Constructor(view as NSViewMBS)
- method Constructor(view as NSViewMBS, printInfo as NSPrintInfoMBS)
- method context as NSGraphicsMBS
- method currentPage as Integer
- method data as Memoryblock
- method Destructor
- method isCopyingOperation as boolean
- method pageRange as NSRangeMBS
- method preferredRenderingQuality as Integer
- method runOperation as boolean
- method runOperationModalForWindow(win as DesktopWindow)
- method runOperationModalForWindow(win as NSWindowMBS)
- method runOperationModalForWindow(win as window)
- method view as NSViewMBS
- 15 shared methods
- shared method currentOperation as NSPrintOperationMBS
- shared method EPSOperationWithView(view as NSViewMBS, rect as NSRectMBS) as NSPrintOperationMBS
- shared method EPSOperationWithView(view as NSViewMBS, rect as NSRectMBS, printInfo as NSPrintInfoMBS) as NSPrintOperationMBS
- shared method EPSOperationWithView(view as NSViewMBS, rect as NSRectMBS, printInfo as NSPrintInfoMBS, file as folderitem) as NSPrintOperationMBS
- shared method EPSOperationWithView(view as NSViewMBS, rect as NSRectMBS, printInfo as NSPrintInfoMBS, path as string) as NSPrintOperationMBS
- shared method NSPrintOperationExistsException as string
- shared method PDFOperationWithView(view as NSViewMBS, rect as NSRectMBS) as NSPrintOperationMBS
- shared method PDFOperationWithView(view as NSViewMBS, rect as NSRectMBS, printInfo as NSPrintInfoMBS) as NSPrintOperationMBS
- shared method PDFOperationWithView(view as NSViewMBS, rect as NSRectMBS, printInfo as NSPrintInfoMBS, file as folderitem) as NSPrintOperationMBS
- shared method PDFOperationWithView(view as NSViewMBS, rect as NSRectMBS, printInfo as NSPrintInfoMBS, path as string) as NSPrintOperationMBS
- shared method printOperationWithView(view as DesktopHTMLViewer, printInfo as NSPrintInfoMBS = nil) as NSPrintOperationMBS
- shared method printOperationWithView(view as HTMLViewer, printInfo as NSPrintInfoMBS = nil) as NSPrintOperationMBS
- shared method printOperationWithView(view as NSViewMBS) as NSPrintOperationMBS
- shared method printOperationWithView(view as NSViewMBS, printInfo as NSPrintInfoMBS) as NSPrintOperationMBS
- shared method setCurrentOperation(operation as NSPrintOperationMBS)
- 6 constants
Page Order Constants
Constant | Value | Description |
---|---|---|
NSAscendingPageOrder | 1 |
Ascending (back to front) page order. |
NSDescendingPageOrder | -1 |
Descending (front to back) page order. |
NSSpecialPageOrder | 0 |
The spooler does not rearrange pages—they are printed in the order received by the spooler. |
NSUnknownPageOrder | 2 |
No page order specified. |
Print Quality Constants
Constant | Value | Description |
---|---|---|
NSPrintRenderingQualityBest | 0 |
Renders the printing at the best possible quality, regardless of speed. Available in OS X v10.7 and later. |
NSPrintRenderingQualityResponsive | 1 | Sacrifices the least possible amount of rendering quality for speed to maintain a responsive user interface. This option should be used only after establishing that best quality rendering does indeed make the user interface unresponsive. more |
This class has no sub classes.
Some methods using this class:
- DesktopWKWebViewControlMBS.printOperation(printInfo as NSPrintInfoMBS) as NSPrintOperationMBS
- WKWebViewControlMBS.printOperation(printInfo as NSPrintInfoMBS) as NSPrintOperationMBS
- WKWebViewMBS.printOperation(printInfo as NSPrintInfoMBS) as NSPrintOperationMBS
Some examples using this class:
- /Mac64bit/WebKit2/HTMLViewer Save As PDF
- /MacCocoa/Printing/NSPrintOperation
- /MacControls/NSPrintOperation HTMLViewer
- /PDFKit/PDFKit Print PDF
Blog Entries
- MBS Xojo Plugins, version 21.6pr3
- Several ways for picture to PDF in MBS Plugins
- MBS Xojo Plugins, version 21.2pr5
- MBS Xojo Plugins, version 20.6pr3
- Tip fo the day: Print to PDF for WebView
- MBS Xojo Plugins, version 17.6pr5
- [ANN] MonkeyBread Software Releases the MBS Xojo / Real Studio plug-ins in version 14.4
- MBS Xojo / Real Studio Plugins, version 14.4pr10
- PDF printing via PDFKit
- MBS Real Studio Plugins, version 12.4pr1
Release notes
- Version 22.0
- Added methods for NSPrintOperationMBS class to handle DesktopHTMLViewer.
- Version 21.2
- Updated NSPrintOperationMBS.printOperationWithView for WebKit 2.
- Version 21.0
- Fixed problem with NSPrintOperationMBS class when destructor is not called on main thread.
- Version 18.0
- Changed NSPrintOperationMBS to automatically pick WebDocumentView when passing WebView object.
The items on this page are in the following plugins: MBS MacCocoa Plugin.
NSPrintInfoMBS - NSPrintPanelMBS