Document Classes

Packaged Document

class document.PackagedDocument

The PackagedDocument manages a zip-packed ODF document.

Warning

Don’t create instances of this class by yourself, always use ezodf.opendoc() and ezodf.newdoc() to open or create documents.

Attributes

PackagedDocument.backup(read/write)

True or False: Create backup files on save() and saveas().

PackagedDocument.docname(read/write)

The file system filename, None if not set.

PackagedDocument.doctype(read)

The document doctype is a three character string like the usual file extensions ('odt' for text, 'ods' for spreadsheets and so on, see also Doctype Table)

PackagedDocument.mimetype(read)

The document mimetype (see also Doctype Table)

PackagedDocument.meta

see meta.Meta

PackagedDocument.styles
PackagedDocument.body

Methods

PackagedDocument.save()

Save document to file system.

PackagedDocument.saveas(filename)

Save document to file system with a new filename.

PackagedDocument.tobytes()

Get the document zip-file as bytes.

Flat XML Document

class document.FlatXMLDocument(filetype='odt', filename=None)

The FlatXMLDocument manages a single-XML-file ODF document.

Warning

Don’t create instances of this class by yourself, always use ezodf.opendoc() and ezodf.newdoc() to open or create documents.

Attributes

FlatXMLDocument.doctype

see PackagedDocument.doctype

FlatXMLDocument.mimetype

see PackagedDocument.mimetype

Methods

FlatXMLDocument.save()

see PackagedDocument.save()

FlatXMLDocument.saveas(filename)

see PackagedDocument.saveas()

Table Of Contents

Previous topic

GenericWrapper Class

Next topic

Meta Data Management

This Page