Attributes that apply to a document.
SDKs
- iOS 11.0+
- macOS 10.13+
- tvOS 11.0+
- watchOS 4.0+
Frameworks
- UIKit
- App
Kit
Declaration
struct DocumentAttributeKey
Attributes that apply to a document.
SDKs
Frameworks
struct DocumentAttributeKey
static let author: NSAttributed String .Document Attribute Key
The value of this attribute is an NSString
object containing author name.
static let background Color: NSAttributed String .Document Attribute Key
The value of this attribute is an NSColor
object representing the document-wide page background color.
static let bottom Margin: NSAttributed String .Document Attribute Key
The value of this attribute is an NSNumber
object containing a float, in points.
static let category: NSAttributed String .Document Attribute Key
The value of this attribute is an NSString
object containing the document’s category.
static let character Encoding: NSAttributed String .Document Attribute Key
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.
static let cocoa Version Document Attribute: NSAttributed String .Document Attribute Key
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.
static let comment: NSAttributed String .Document Attribute Key
The value of this attribute is an NSString
object containing document comments.
static let company: NSAttributed String .Document Attribute Key
The value of this attribute is an NSString
object containing company or organization name.
static let converted: NSAttributed String .Document Attribute Key
The value of this attribute is an NSNumber
object containing an int. Indicates whether the file was converted by a filter service.
static let copyright: NSAttributed String .Document Attribute Key
The value of this attribute is an NSString
object containing document copyright info.
static let creation Time: NSAttributed String .Document Attribute Key
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.
static let default Tab Interval: NSAttributed String .Document Attribute Key
The value of this attribute is an NSNumber
object containing a float. Represents the document-wide default tab stop interval.
static let editor: NSAttributed String .Document Attribute Key
The value of this attribute is an NSString
object containing name of person who last edited the document.
static let file Type: NSAttributed String .Document Attribute Key
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 document
, but for writing the two are mutually exclusive.
static let hyphenation Factor: NSAttributed String .Document Attribute Key
The value of this attribute is an NSNumber
object containing a float; 0 = off, 1 = full hyphenation.
static let left Margin: NSAttributed String .Document Attribute Key
The value of this attribute is an NSNumber
object containing a float, in points.
static let manager: NSAttributed String .Document Attribute Key
The value of this attribute is an NSString
object containing the name of the author's manager.
static let modification Time: NSAttributed String .Document Attribute Key
The value of this attribute is an NSDate
object containing the modification date of the document contents.
static let prefix Spaces: NSAttributed String .Document Attribute Key
An NSNumber
object containing an integer (default 0) representing the number of spaces per level by which to indent certain nested HTML elements.
static let read Only: NSAttributed String .Document Attribute Key
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.
static let right Margin: NSAttributed String .Document Attribute Key
The value of this attribute is an NSNumber
object containing a float, in points.
static let subject: NSAttributed String .Document Attribute Key
The value of this attribute is an NSString
object containing subject of document.
static let text Encoding Name: NSAttributed String .Document Attribute Key
An NSString
object containing the name, IANA or otherwise, of a text encoding to be used; mutually exclusive with character
.
static let title: NSAttributed String .Document Attribute Key
The value of this attribute is an NSString
object containing document title.
static let top Margin: NSAttributed String .Document Attribute Key
The value of this attribute is an NSNumber
object containing a float, in points.
static let view Mode: NSAttributed String .Document Attribute Key
The value of this attribute is an NSValue
object containing an int; 0 = normal; 1 = page layout (use value of @"Paper
).
static let view Size: NSAttributed String .Document Attribute Key
The value of this attribute is an NSValue
object containing NSSize.
static let view Zoom: NSAttributed String .Document Attribute Key
The value of this attribute is an NSValue
object containing a float. 100 = 100% zoom.
Beta Software
This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.
Learn more about using Apple's beta software