Global Variable

NSDocumentTypeDocumentAttribute

Declaration

iOS, Mac Catalyst, tvOS, watchOS
const NSAttributedStringDocumentAttributeKey NSDocumentTypeDocumentAttribute;
macOS
NSAttributedStringDocumentAttributeKey NSDocumentTypeDocumentAttribute;

Discussion

The value of this attribute is one of the document types declared in NSAttributedStringDocumentType. For reader methods, this key in options can specify the document type for interpreting the contents. Upon return, the document attributes can contain this key for indicating the actual format used to read the contents. For write methods, this key specifies the format for generating the data. @"DocumentType",

See Also

Keys

NSAuthorDocumentAttribute

The value of this attribute is an NSString object containing author name.

NSBackgroundColorDocumentAttribute

The value of this attribute is an NSColor object representing the document-wide page background color.

NSBottomMarginDocumentAttribute

The value of this attribute is an NSNumber object containing a float, in points.

NSCategoryDocumentAttribute

The value of this attribute is an NSString object containing the document’s category.

NSCharacterEncodingDocumentAttribute

The value of this attribute is an NSNumber object containing integer specifying NSStringEncoding 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.

NSCocoaVersionDocumentAttribute

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.

NSCommentDocumentAttribute

The value of this attribute is an NSString object containing document comments.

NSCompanyDocumentAttribute

The value of this attribute is an NSString object containing company or organization name.

NSConvertedDocumentAttribute

The value of this attribute is an NSNumber object containing an int. Indicates whether the file was converted by a filter service.

NSCopyrightDocumentAttribute

The value of this attribute is an NSString object containing document copyright info.

NSCreationTimeDocumentAttribute

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.

NSDefaultTabIntervalDocumentAttribute

The value of this attribute is an NSNumber object containing a float. Represents the document-wide default tab stop interval.

NSEditorDocumentAttribute

The value of this attribute is an NSString object containing name of person who last edited the document.

NSExcludedElementsDocumentAttribute

An NSArray object containing NSString objects, representing HTML elements not to be used in generated HTML.

NSFileTypeDocumentAttribute

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 NSDocumentTypeDocumentAttribute, but for writing the two are mutually exclusive.

NSHyphenationFactorDocumentAttribute

The value of this attribute is an NSNumber object containing a float; 0 = off, 1 = full hyphenation.

NSKeywordsDocumentAttribute

The value of this attribute is an NSArray object containing NSString objects, containing keywords.

NSLeftMarginDocumentAttribute

The value of this attribute is an NSNumber object containing a float, in points.

NSManagerDocumentAttribute

The value of this attribute is an NSString object containing the name of the author's manager.

NSModificationTimeDocumentAttribute

The value of this attribute is an NSDate object containing the modification date of the document contents.

NSPaperSizeDocumentAttribute

The value of this attribute is an NSValue object containing NSSize.

NSPrefixSpacesDocumentAttribute

An NSNumber object containing an integer (default 0) representing the number of spaces per level by which to indent certain nested HTML elements.

NSReadOnlyDocumentAttribute

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.

NSRightMarginDocumentAttribute

The value of this attribute is an NSNumber object containing a float, in points.

NSSubjectDocumentAttribute

The value of this attribute is an NSString object containing subject of document.

NSTextEncodingNameDocumentAttribute

An NSString object containing the name, IANA or otherwise, of a text encoding to be used; mutually exclusive with NSCharacterEncodingDocumentAttribute.

NSTitleDocumentAttribute

The value of this attribute is an NSString object containing document title.

NSTopMarginDocumentAttribute

The value of this attribute is an NSNumber object containing a float, in points.

NSViewModeDocumentAttribute

The value of this attribute is an NSValue object containing an int; 0 = normal; 1 = page layout (use value of @"PaperSize").

NSViewSizeDocumentAttribute

The value of this attribute is an NSValue object containing NSSize.

NSViewZoomDocumentAttribute

The value of this attribute is an NSValue object containing a float. 100 = 100% zoom.