<!--
{
  "availability" : [
    "iOS: 15.0.0 -",
    "iPadOS: 15.0.0 -",
    "macCatalyst: 15.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "QuickLook",
  "identifier" : "/documentation/QuickLook/QLPreviewReply",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "Quick Look"
    ],
    "preciseIdentifier" : "c:objc(cs)QLPreviewReply"
  },
  "title" : "QLPreviewReply"
}
-->

# QLPreviewReply

```
class QLPreviewReply
```

## Overview\abstract To provide a data-based preview, you have to return a QLPreviewReply object.

## Topics

### Initializers

[`convenience init(contextSize: CGSize, isBitmap: Bool, drawUsing: (CGContext, QLPreviewReply) throws -> Void)`](/documentation/QuickLook/QLPreviewReply/init(contextSize:isBitmap:drawUsing:))

[`convenience init(dataOfContentType: UTType, contentSize: CGSize, createDataUsing: (QLPreviewReply) throws -> Data)`](/documentation/QuickLook/QLPreviewReply/init(dataOfContentType:contentSize:createDataUsing:))

[`init(fileURL: URL)`](/documentation/QuickLook/QLPreviewReply/init(fileURL:))

[`convenience init(forPDFWithPageSize: CGSize, createDocumentUsing: (QLPreviewReply) throws -> PDFDocument)`](/documentation/QuickLook/QLPreviewReply/init(forPDFWithPageSize:createDocumentUsing:))

### Instance Properties

[`var attachments: [String : QLPreviewReplyAttachment]`](/documentation/QuickLook/QLPreviewReply/attachments)

Attachments for HTML data previews. The keys of the dictionary are the attachment identifiers (eg foo) that can be referenced with the cid:id URL (eg cid:foo).

[`var stringEncoding: String.Encoding`](/documentation/QuickLook/QLPreviewReply/stringEncoding-8rrio)

[`var title: String`](/documentation/QuickLook/QLPreviewReply/title)

Custom display title for the preview. If left as the empty string, QuickLook will use the file name.

## Relationships

### Conforms To

[`Hashable`](/documentation/Swift/Hashable)

[`Equatable`](/documentation/Swift/Equatable)

[`CustomDebugStringConvertible`](/documentation/Swift/CustomDebugStringConvertible)

[`CVarArg`](/documentation/Swift/CVarArg)

[`CustomStringConvertible`](/documentation/Swift/CustomStringConvertible)

[`NSObjectProtocol`](/documentation/ObjectiveC/NSObjectProtocol)

### Inherits From

[`NSObject-swift.class`](/documentation/ObjectiveC/NSObject-swift.class)

---

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)