<!--
{
  "availability" : [
    "macOS: 10.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSViewModeDocumentAttribute",
  "metadataVersion" : "0.1.0",
  "role" : "Global Variable",
  "symbol" : {
    "kind" : "Global Variable",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:@NSViewModeDocumentAttribute"
  },
  "title" : "NSViewModeDocumentAttribute"
}
-->

# NSViewModeDocumentAttribute

The view mode.

```
extern NSAttributedStringDocumentAttributeKey NSViewModeDocumentAttribute;
```

## Discussion

The value of this attribute is an <doc://com.apple.documentation/documentation/Foundation/NSValue> object containing an integer. A value of `0` indicates normal, and a value of `1` indicates page layout (use the value `@"PaperSize"`).

The string constant in macOS 10.3 and earlier is `@"ViewMode"`.

---

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)