Attributes that apply to a document.
SDKs
- iOS 11.0+
- macOS 10.13+
- Mac Catalyst 13.0+
- tvOS 11.0+
- watchOS 4.0+
Frameworks
- UIKit
- App
Kit
Declaration
typedef NSString *NSAttributedStringDocumentAttributeKey;
Attributes that apply to a document.
SDKs
Frameworks
typedef NSString *NSAttributedStringDocumentAttributeKey;
NSAuthor Document Attribute
The value of this attribute is an NSString
object containing author name.
NSBackground Color Document Attribute
The value of this attribute is an NSColor
object representing the document-wide page background color.
NSBottom Margin Document Attribute
The value of this attribute is an NSNumber
object containing a float, in points.
NSCategory Document Attribute
The value of this attribute is an NSString
object containing the document’s category.
NSCharacter Encoding Document Attribute
The value of this attribute is an NSNumber
object containing integer specifying NSString
for the file; default for plain text is the default encoding. This key in options can specify the string encoding for reading the data. Upon return, the document attributes can contain the actual encoding used. For writing methods, this value is used for generating the plain text data.
NSCocoa Version Document Attribute
The value of this attribute is an NSNumber
object containing a float. For RTF files only, stores the version of Cocoa with which the file was created. Absence of this value indicates RTF file not created by Cocoa or its predecessors.
NSComment Document Attribute
The value of this attribute is an NSString
object containing document comments.
NSCompany Document Attribute
The value of this attribute is an NSString
object containing company or organization name.
NSConverted Document Attribute
The value of this attribute is an NSNumber
object containing an int. Indicates whether the file was converted by a filter service.
NSCopyright Document Attribute
The value of this attribute is an NSString
object containing document copyright info.
NSCreation Time Document Attribute
The value of this attribute is an NSDate
object containing the creation date of the document; note that this is not the file system creation date of the file, but of the document.
NSDefault Tab Interval Document Attribute
The value of this attribute is an NSNumber
object containing a float. Represents the document-wide default tab stop interval.
NSEditor Document Attribute
The value of this attribute is an NSString
object containing name of person who last edited the document.
NSFile Type Document Attribute
The value of this attribute is an NSString
object indicating which document type was used to interpret the document, specified as a UTI; for reading, this is available along with NSDocument
, but for writing the two are mutually exclusive.
NSHyphenation Factor Document Attribute
The value of this attribute is an NSNumber
object containing a float; 0 = off, 1 = full hyphenation.
NSLeft Margin Document Attribute
The value of this attribute is an NSNumber
object containing a float, in points.
NSManager Document Attribute
The value of this attribute is an NSString
object containing the name of the author's manager.
NSModification Time Document Attribute
The value of this attribute is an NSDate
object containing the modification date of the document contents.
NSPrefix Spaces Document Attribute
An NSNumber
object containing an integer (default 0) representing the number of spaces per level by which to indent certain nested HTML elements.
NSRead Only Document Attribute
The value of this attribute is an NSNumber
object containing an integer. If missing or 0 or negative, not read only; 1 or more, read only.
NSRight Margin Document Attribute
The value of this attribute is an NSNumber
object containing a float, in points.
NSSubject Document Attribute
The value of this attribute is an NSString
object containing subject of document.
NSText Encoding Name Document Attribute
An NSString
object containing the name, IANA or otherwise, of a text encoding to be used; mutually exclusive with NSCharacter
.
NSTitle Document Attribute
The value of this attribute is an NSString
object containing document title.
NSTop Margin Document Attribute
The value of this attribute is an NSNumber
object containing a float, in points.
NSView Mode Document Attribute
The value of this attribute is an NSValue
object containing an int; 0 = normal; 1 = page layout (use value of @"Paper
).
NSView Size Document Attribute
The value of this attribute is an NSValue
object containing NSSize.
NSView Zoom Document Attribute
The value of this attribute is an NSValue
object containing a float. 100 = 100% zoom.