<!--
{
  "availability" : [
    "macOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSWindow/dataWithEPS(inside:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(cs)NSWindow(im)dataWithEPSInsideRect:"
  },
  "title" : "dataWithEPS(inside:)"
}
-->

# dataWithEPS(inside:)

Returns EPS data that draws the region of the window within a given rectangle.

```
func dataWithEPS(inside rect: NSRect) -> Data
```

## Parameters

`rect`

A rectangle (expressed in the window’s coordinate system) that identifies the region to be expressed as EPS data.

## Return Value

The region in the window (identified by `rect`) as EPS data.

## Discussion

This data can be placed on a pasteboard, written to a file, or used to create an `NSImage` object.

## See Also

[`-  dataWithEPSInsideRect:`](/documentation/AppKit/NSView/dataWithEPS(inside:))

Returns EPS data that draws the region of the view within a specified rectangle.

[`-  writeEPSInsideRect:toPasteboard:`](/documentation/AppKit/NSView/writeEPS(inside:to:))

Writes EPS data that draws the region of the view within a specified rectangle onto a pasteboard.



---

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)