Documentation

This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

mlreportgen.dom.InnerMargin class

Package: mlreportgen.dom
Superclasses:

Margin between content and bounding box

Description

Specifies the margin between the content and the bounding box of a document object. A bounding box of an object includes the border of the object (if it has a border), the inner margin, and the object content.

Construction

marginObj = InnerMargin() creates an unspecified margin between the content of an object and its bounding box.

marginObj = InnerMargin(all) creates the specified margin on all sides between the content of an object and its bounding box.

marginObj = InnerMargin(left,right) creates the specified margins between the left and right sides of the content of an object and its bounding box.

marginObj = InnerMargin(left,right,top,bottom) creates the specified margins between sides of the content of an object and its bounding box.

Input Arguments

expand all

Margin on all sides between the content of an object and its bounding box in the form valueUnits where Units is an abbreviation for the units. Valid abbreviations are:

  • px — pixels (default)

  • cm — centimeters

  • in — inches

  • mm — millimeters

  • pc — picas

  • pt — points

Left margin between the content of an object and its bounding box. See the all input argument description for valid values.

Right margin between the content of an object and its bounding box. See the all input argument description for valid values.

Top margin between the content of an object and its bounding box. See the all input argument description for valid values.

Bottom margin between the content of an object and its bounding box. See the all input argument description for valid values.

Output Arguments

expand all

Margin between content and bounding box, specified with an mlreportgen.dom.InnerMargin object.

Properties

expand all

Size of bottom margin in the formvalueUnits where Units is an abbreviation for the units. Valid abbreviations are:

  • px — pixels (default)

  • cm — centimeters

  • in — inches

  • mm — millimeters

  • pc — picas

  • pt — points

Let margin between the content of an object and its bounding box. See the Bottom property description for valid value

ID for this document element, specified as a character vector. The DOM generates a session-unique ID when it creates the document element. You can specify your own ID.

Riht margin between the content of an object and its bounding box. See the Bottom property description for valid values

Tag for document element, specified as a character vector.

A session-unique ID is generated as part of document element creation. The generated tag has the form CLASS:ID, where CLASS is the class of the element and ID is the value of the Id property of the object. You can specify a tag to replace the generated tag.

For example, to make it easier to identify where an issue occurred during document generation, you can specify your own tag value.

Top margin between the content of an object and its bounding box. See the Bottom property description for valid values.

Examples

expand all

import mlreportgen.dom.*;
doctype = 'html';
d = Document('test',doctype);

p = Paragraph('Hello World');
p.Style = {Border('solid','red'), ...
   HAlign('center'),InnerMargin('12pt')};
append(d,p);

p = Paragraph('More Greetings');
p.Style = {Border('solid','blue'), ...
   HAlign('center'),InnerMargin('30pt')};

append(d,p);
close(d);
rptview('test',doctype);
Was this topic helpful?