Platforms to show: All Mac Windows Linux Cross-Platform

Back to NSPrintOperationMBS class.

NSPrintOperationMBS.currentOperation as NSPrintOperationMBS

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 current print operation for this thread.

The print operation object, or nil if there is no current operation.

NSPrintOperationMBS.EPSOperationWithView(view as NSViewMBS, rect as NSRectMBS) as NSPrintOperationMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Cocoa Printing MBS MacCocoa Plugin 12.4 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Creates and returns a new NSPrintOperation object ready to control the copying of EPS graphics from the specified view.

View: The view containing the data to be turned into EPS data.
rect: The portion of the view (specified in points in the view's coordinate space) to be rendered as EPS data.

After the job is run, use the Data function to get the EPS data.
Returns the new NSPrintOperation object. You must run the operation to generate the EPS data.

The new NSPrintOperation object uses the default 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.EPSOperationWithView(view as NSViewMBS, rect as NSRectMBS, printInfo as NSPrintInfoMBS) as NSPrintOperationMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Cocoa Printing MBS MacCocoa Plugin 12.4 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Creates and returns a new NSPrintOperation object ready to control the copying of EPS graphics from the specified view using the specified print settings.

View: The view containing the data to be turned into EPS data.
rect: The portion of the view (specified in points in the view's coordinate space) to be rendered as EPS data.
PrintInfo: The print settings to use when generating the EPS data.

After the job is run, use the Data function to get the EPS data.
Returns the new NSPrintOperation object. You must run the operation to generate the EPS data.

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.EPSOperationWithView(view as NSViewMBS, rect as NSRectMBS, printInfo as NSPrintInfoMBS, file as folderitem) as NSPrintOperationMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Cocoa Printing MBS MacCocoa Plugin 12.4 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Creates and returns a new NSPrintOperation object ready to control the copying of EPS graphics from the specified view and write the resulting data to the specified file.

View: The view containing the data to be turned into EPS data.
rect: The portion of the view (specified in points in the view's coordinate space) to be rendered as EPS data.
path: The path to a file. After the job is run, this file contains the EPS data.
PrintInfo: The print settings to use when generating the EPS data.

Returns the new NSPrintOperation object. You must run the operation to generate the EPS data.
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.EPSOperationWithView(view as NSViewMBS, rect as NSRectMBS, printInfo as NSPrintInfoMBS, path as string) as NSPrintOperationMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Cocoa Printing MBS MacCocoa Plugin 12.4 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Creates and returns a new NSPrintOperation object ready to control the copying of EPS graphics from the specified view and write the resulting data to the specified file.

View: The view containing the data to be turned into EPS data.
rect: The portion of the view (specified in points in the view's coordinate space) to be rendered as EPS data.
path: The path to a file. After the job is run, this file contains the EPS data.
PrintInfo: The print settings to use when generating the EPS data.

Returns the new NSPrintOperation object. You must run the operation to generate the EPS data.
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.NSPrintOperationExistsException 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
The name of an exception raised when there is already a print operation in process.

The methods that raise the NSExceptionMBS exception are the EPSOperation... and printOperation....

NSPrintOperationMBS.PDFOperationWithView(view as NSViewMBS, rect as NSRectMBS) as NSPrintOperationMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Cocoa Printing MBS MacCocoa Plugin 12.4 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Creates and returns a new NSPrintOperation object ready to control the copying of PDF graphics from the specified view.

View: The view containing the data to be turned into PDF data.
rect: The portion of the view (specified in points in the view's coordinate space) to be rendered as PDF data.

After the job is run, the data function gives you the PDF data.

Returns the new NSPrintOperation object. You must run the operation to generate the PDF data.

The new NSPrintOperation object uses the default 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:

Some examples using this method:

NSPrintOperationMBS.PDFOperationWithView(view as NSViewMBS, rect as NSRectMBS, printInfo as NSPrintInfoMBS) as NSPrintOperationMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Cocoa Printing MBS MacCocoa Plugin 12.4 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Creates and returns a new NSPrintOperation object ready to control the copying of PDF graphics from the specified view using the specified print settings.

View: The view containing the data to be turned into PDF data.
rect: The portion of the view (specified in points in the view's coordinate space) to be rendered as PDF data.
PrintInfo: The print settings to use when generating the PDF data.

After the job is run, the data function returns the PDF data.

Returns the new NSPrintOperation object. You must run the operation to generate the PDF data.
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.PDFOperationWithView(view as NSViewMBS, rect as NSRectMBS, printInfo as NSPrintInfoMBS, file as folderitem) as NSPrintOperationMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Cocoa Printing MBS MacCocoa Plugin 12.4 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Creates and returns a new NSPrintOperation object ready to control the copying of PDF graphics from the specified view and write the resulting data to the specified file.

View: The view containing the data to be turned into PDF data.
rect: The portion of the view (specified in points in the view's coordinate space) to be rendered as PDF data.
path: The path to a file. After the job is run, this file contains the PDF data.
PrintInfo: The print settings to use when generating the PDF data.

Returns the new NSPrintOperation object. You must run the operation to generate the PDF data.

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.PDFOperationWithView(view as NSViewMBS, rect as NSRectMBS, printInfo as NSPrintInfoMBS, path as string) as NSPrintOperationMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Cocoa Printing MBS MacCocoa Plugin 12.4 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Creates and returns a new NSPrintOperation object ready to control the copying of PDF graphics from the specified view and write the resulting data to the specified file.

View: The view containing the data to be turned into PDF data.
rect: The portion of the view (specified in points in the view's coordinate space) to be rendered as PDF data.
path: The path to a file. After the job is run, this file contains the PDF data.
PrintInfo: The print settings to use when generating the PDF data.

Returns the new NSPrintOperation object. You must run the operation to generate the PDF data.

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.printOperationWithView(view as DesktopHTMLViewer, printInfo as NSPrintInfoMBS = nil) as NSPrintOperationMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Cocoa Printing MBS MacCocoa Plugin 22.0 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Creates and returns an NSPrintOperation object ready to control the printing of the specified view using custom print settings.
Example
// print a HTMLViewer
dim n as NSPrintOperationMBS = NSPrintOperationMBS.printOperationWithView(HTMLViewer1)

n.showsPrintPanel = true
n.showsProgressPanel = true
n.runOperationModalForWindow(self)

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:

Some examples using this method:

NSPrintOperationMBS.printOperationWithView(view as HTMLViewer, printInfo as NSPrintInfoMBS = nil) as NSPrintOperationMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Cocoa Printing MBS MacCocoa Plugin 14.4 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Creates and returns an NSPrintOperation object ready to control the printing of the specified view using custom print settings.
Example
// print a HTMLViewer
dim n as NSPrintOperationMBS = NSPrintOperationMBS.printOperationWithView(HTMLViewer1)

n.showsPrintPanel = true
n.showsProgressPanel = true
n.runOperationModalForWindow(self)

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.printOperationWithView(view as NSViewMBS) as NSPrintOperationMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Cocoa Printing MBS MacCocoa Plugin 12.4 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Creates and returns an NSPrintOperation object ready to control the printing of the specified view.
Example
// print a text area
dim textView as NSTextViewMBS = TextArea1.NSTextViewMBS
dim o as NSPrintOperationMBS = NSPrintOperationMBS.printOperationWithView(textView)

o.showsPrintPanel = true
o.runOperationModalForWindow(Window1)
o = nil

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.printOperationWithView(view as NSViewMBS, printInfo as NSPrintInfoMBS) as NSPrintOperationMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method Cocoa Printing MBS MacCocoa Plugin 12.4 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Creates and returns an NSPrintOperation object ready to control the printing of the specified view using custom print settings.

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.setCurrentOperation(operation as NSPrintOperationMBS)

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
Sets the current print operation for this thread.

operation: The print operation to make current. You may specify nil to clear the current print operation.

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


The biggest plugin in space...