User`s guide

mlreportgen.dom.Document class
12-77
Method Purpose
getOPCMainPart Get full path of main part of output
document.
moveToNextHole Move to next template hole.
open Open this document.
package Append file to OPC package of document.
setCoreProperties Set core properties of document element.
Examples
Create a Word Document
import mlreportgen.dom.*;
d = Document('mydoc','docx');
p = Paragraph('Hello World');
append(d,p);
close(d);
rptview('mydoc_1.htmx');
Create an HTML Document as a Single File
Create an HTML document as a single HTML file that includes the images of
the document. The example assumes that there is a MyImage.jpg image and a
myHTMLTemplate.html HTML template file.
Create a document whose output is a single HTML file.
import mlreportgen.dom.*;
d = Document('mydoc','html-file','myHTMLTemplate');
open(d);
Append text and an image.
append(d,'Hello world');
append(d,Image('C:/images/LocalSystem/MyImage.jpg'));
Close and generate the report.