---
title: dataRepresentation()
framework: pencilkit
role: symbol
role_heading: Instance Method
path: pencilkit/pkdrawing-swift.struct/datarepresentation()
---

# dataRepresentation()

Returns a raw data representation of the rendered content.

## Declaration

```swift
func dataRepresentation() -> Data
```

## Return Value

Return Value A new NSData object that contains the entire contents of the drawing.

## See Also

### Getting the drawing data

- [strokes](pencilkit/pkdrawing-swift.struct/strokes.md)
- [PKAppleDrawingTypeIdentifier](pencilkit/pkappledrawingtypeidentifier.md)
