Main Content

close

Class: mlreportgen.dom.Document
Namespace: mlreportgen.dom

Close document

Description

tf = close(docObj) closes the mlreportgen.dom.Document object specified by docObj, and returns 1 if successful. If the object specified by docObj is not currently open, then it returns 0. Once a document is closed, you can no longer append content to it. Closing the document outputs any remaining content, such as remaining template text.

example

Examples

expand all

Close the myReport document.

import mlreportgen.dom.*;
myReport = Document('mydoc','html');

append(myReport,Paragraph('This is an introduction'));

close(myReport);
rptview('mydoc','html');

Input Arguments

expand all

Document to close, specified as an mlreportgen.dom.Document object.

Version History

Introduced in R2014b