---
title: dataRepresentation()
framework: pencilkit
role: symbol
role_heading: Instance Method
path: pencilkit/pkdrawingreference/datarepresentation()
---

# dataRepresentation()

Returns a representation of the rendered content as data.

## 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/pkdrawingreference/strokes.md)
- [PKAppleDrawingTypeIdentifier](pencilkit/pkappledrawingtypeidentifier.md)
