Documentation
¶
Overview ¶
Package iwork reads documents of Apple's iWork applications, Pages, Keynote and Numbers, which are zip archives: the properties of a document from iWork '09, such as its title and authors, and the template and version of a document from iWork 2013 and later, and their previews
Index ¶
Constants ¶
const ( ContentTypePages = "application/vnd.apple.pages" ContentTypeKeynote = "application/vnd.apple.keynote" ContentTypeNumbers = "application/vnd.apple.numbers" )
The content types of documents of Pages, Keynote and Numbers
Variables ¶
var ( // ErrNotDocument is returned for a zip archive which isn't an iWork // document ErrNotDocument = errors.New("not an iWork document") )
Functions ¶
This section is empty.
Types ¶
type Document ¶
type Document struct {
// The document's properties, which a document from iWork '09 has
Title, Comment, Copyright string
Authors, Keywords, Projects []string
// The template the document was made from, and when, and the version
// of the application which last saved it, such as 7.1, which a
// document from iWork 2013 or later has
Template string
Created time.Time
Version string
// The document's preview, which is a JPEG image, or nil
Preview []byte
}
Document is what's known of an iWork document, each of which is empty, or zero, when it isn't known
func Parse ¶
Parse returns what's known of the iWork document of the size: the properties of a document from iWork '09, from its index.xml, which can be compressed, or the template and version of a document from iWork 2013 or later, from its build version history, and its preview, or ErrNotDocument when it isn't an iWork document