User`s guide

mlreportgen.dom.DocumentPart class
12-79
mlreportgen.dom.DocumentPart class
Package: mlreportgen.dom
Document part
Description
This class defines a form that can be filled out and appended to a document or another
document part of the same output type.
Construction
documentPartObj = DocumentPart() creates an HTML document part using the
default HTML template.
documentPart = DocumentPart(type) creates a document part of the specified type
(for example, Microsoft Word).
documentPartObj = DocumentPart(type,templatePath) creates a document part
based on the specified master template. The template must be either an HTML or Word
template, depending on the part type.
documentPartObj = DocumentPart(type,templatePath,
embeddedTemplateName) creates a document part of the specified type based on the
embedded template stored in the specified master template.
documentPartObj = DocumentPart(templateSrc,embeddeTemplateName)
creates a document part with the output type of the template used by the specified
master template source. The template source is a document or document part that
contains the embedded template.
Input Arguments
type — Type of output
'html' (default) | 'docx' | 'html-file'