<!--
{
  "availability" : [
    "macOS: 10.6.0 - 12.0.0"
  ],
  "documentType" : "symbol",
  "framework" : "QuickLook",
  "identifier" : "/documentation/QuickLook/QLPreviewRequestGetDocumentObject(_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Function",
  "symbol" : {
    "kind" : "Function",
    "modules" : [
      "Quick Look"
    ],
    "preciseIdentifier" : "c:@F@QLPreviewRequestGetDocumentObject"
  },
  "title" : "QLPreviewRequestGetDocumentObject(_:)"
}
-->

# QLPreviewRequestGetDocumentObject(_:)

Returns the object that’s stored as part of a preview request.

```
func QLPreviewRequestGetDocumentObject(_ preview: QLPreviewRequest!) -> UnsafeRawPointer!
```

## Parameters

`preview`

The preview request object.

## Return Value

The object that’s stored as part of the preview request.

## Discussion

Use this method to get the object that you stored previously with the preview request using [`QLPreviewRequestSetDocumentObject(_:_:_:)`](/documentation/QuickLook/QLPreviewRequestSetDocumentObject(_:_:_:)).

---

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)