Example #1
0
def odf_new_document_from_template(template_path):
    """Return an "odf_document" instance using the given template.

    Example::

        >>> path = 'models/invoice.ott'
        >>> document = odf_new_document_from_template(path)
    """
    container = odf_new_container_from_template(template_path)
    return odf_document(container)
Example #2
0
def odf_new_document_from_template(template_uri):
    """Return an "odf_document" instance using the given template.

    Example::

        >>> uri = 'uri://of/a/template.ott'
        >>> document = odf_new_document_from_template(uri)
    """
    container = odf_new_container_from_template(template_uri)
    return odf_document(container)
Example #3
0
def odf_new_document_from_template(template_path):
    """Return an "odf_document" instance using the given template.

    Example::

        >>> path = 'models/invoice.ott'
        >>> document = odf_new_document_from_template(path)
    """
    container = odf_new_container_from_template(template_path)
    return odf_document(container)