---
title: documentType
framework: foundation
role: symbol
role_heading: Type Property
path: foundation/nsattributedstring/documentreadingoptionkey/documenttype
---

# documentType

The document type.

## Declaration

```swift
static let documentType: NSAttributedString.DocumentReadingOptionKey
```

## Discussion

Discussion One of the document types described in NSAttributedString.DocumentType, indicating a document type to be forced when loading the document. The previous string constant was @"DocumentType".

## See Also

### Getting the document options

- [baseURL](foundation/nsattributedstring/documentreadingoptionkey/baseurl.md)
- [characterEncoding](foundation/nsattributedstring/documentreadingoptionkey/characterencoding.md)
- [defaultAttributes](foundation/nsattributedstring/documentreadingoptionkey/defaultattributes.md)
- [fileType](foundation/nsattributedstring/documentreadingoptionkey/filetype.md)
- [readAccessURL](foundation/nsattributedstring/documentreadingoptionkey/readaccessurl.md)
- [textEncodingName](foundation/nsattributedstring/documentreadingoptionkey/textencodingname.md)
- [textSizeMultiplier](foundation/nsattributedstring/documentreadingoptionkey/textsizemultiplier.md)
- [timeout](foundation/nsattributedstring/documentreadingoptionkey/timeout.md)
- [webPreferences](foundation/nsattributedstring/documentreadingoptionkey/webpreferences.md)
- [webResourceLoadDelegate](foundation/nsattributedstring/documentreadingoptionkey/webresourceloaddelegate.md)
