<!--
{
  "availability" : [
    "macOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSPrintOperation/epsOperation(with:inside:to:printInfo:)",
  "metadataVersion" : "0.1.0",
  "role" : "Type Method",
  "symbol" : {
    "kind" : "Type Method",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(cs)NSPrintOperation(cm)EPSOperationWithView:insideRect:toData:printInfo:"
  },
  "title" : "epsOperation(with:inside:to:printInfo:)"
}
-->

# epsOperation(with:inside:to:printInfo:)

Creates and returns a new print operation object ready to control the copying of EPS graphics from the specified view using the specified print settings.

```
class func epsOperation(with view: NSView, inside rect: NSRect, to data: NSMutableData, printInfo: NSPrintInfo) -> NSPrintOperation
```

## Parameters

`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.

`data`

An empty `NSMutableData` object. After the job is run, this object contains the EPS data.

`printInfo`

The print settings to use when generating the EPS data.

## Return Value

The new `NSPrintOperation` object. You must run the operation to generate the EPS data.

## Discussion

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

[`run()`](/documentation/AppKit/NSPrintOperation/run())

Runs the print operation on the current thread.



---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)