---
title: "dataWithEPS(inside:)"
framework: appkit
role: symbol
role_heading: Instance Method
path: "appkit/nswindow/datawitheps(inside:)"
---

# dataWithEPS(inside:)

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

## Declaration

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

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

## Discussion

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

## See Also

### Related Documentation

- [dataWithEPS(inside:)](appkit/nsview/datawitheps(inside:).md)
- [writeEPS(inside:to:)](appkit/nsview/writeeps(inside:to:).md)

### Printing Windows

- [printWindow(_:)](appkit/nswindow/printwindow(_:).md)
- [dataWithPDF(inside:)](appkit/nswindow/datawithpdf(inside:).md)
