---
title: paperMargin
framework: foundation
role: symbol
role_heading: Type Property
path: foundation/nsattributedstring/documentattributekey/papermargin
---

# paperMargin

The paper margin of the document.

## Declaration

```swift
static let paperMargin: NSAttributedString.DocumentAttributeKey
```

```swift
static let paperMarginDocumentAttribute: NSAttributedString.DocumentAttributeKey
```

## Discussion

Discussion The value of this attribute is an NSValue object containing UIEdgeInsets. The string constant in macOS 10.3 and earlier is @"PaperMargin".

## See Also

### Getting document appearance keys

- [appearance](foundation/nsattributedstring/documentattributekey/appearance.md)
- [backgroundColor](foundation/nsattributedstring/documentattributekey/backgroundcolor.md)
- [bottomMargin](foundation/nsattributedstring/documentattributekey/bottommargin.md)
- [defaultFontExcluded](foundation/nsattributedstring/documentattributekey/defaultfontexcluded.md)
- [defaultTabInterval](foundation/nsattributedstring/documentattributekey/defaulttabinterval.md)
- [excludedElements](foundation/nsattributedstring/documentattributekey/excludedelements.md)
- [hyphenationFactor](foundation/nsattributedstring/documentattributekey/hyphenationfactor.md)
- [leftMargin](foundation/nsattributedstring/documentattributekey/leftmargin.md)
- [paperSize](foundation/nsattributedstring/documentattributekey/papersize.md)
- [prefixSpaces](foundation/nsattributedstring/documentattributekey/prefixspaces.md)
- [rightMargin](foundation/nsattributedstring/documentattributekey/rightmargin.md)
- [textLayoutSections](foundation/nsattributedstring/documentattributekey/textlayoutsections.md)
- [topMargin](foundation/nsattributedstring/documentattributekey/topmargin.md)
- [viewMode](foundation/nsattributedstring/documentattributekey/viewmode.md)
- [viewSize](foundation/nsattributedstring/documentattributekey/viewsize.md)
