Main Content

mlreportgen.dom.InnerMargin Class

Namespace: mlreportgen.dom

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.

The mlreportgen.dom.InnerMargin class is a handle class.

Creation

Description

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.

example

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, specified as character vector or string scalar that contains a number followed by an abbreviation for a unit of measurement. For example, "10px" specifies 10 pixels. Valid abbreviations are:

  • "px" — Pixels

  • "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.

Properties

expand all

Size of bottom margin, specified as character vector or string scalar that contains a number followed by an abbreviation for a unit of measurement. For example, "10px" specifies 10 pixels. Valid abbreviations are:

  • "px" — Pixels

  • "cm" — Centimeters

  • "in" — Inches

  • "mm" — Millimeters

  • "pc" — Picas

  • "pt" — Points

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

Object identifier, specified as a character vector or string scalar. The DOM API generates a session-unique identifier when it creates the document element object.

Attributes:

GetAccess
public
SetAccess
public
NonCopyable
true

Data Types: char | string

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

Tag, specified as a character vector or string scalar. The DOM API generates a session-unique tag as part of the creation of this object. The generated tag has the form CLASS:ID, where CLASS is the object class and ID is the value of the Id property of the object. Use this value to help identify where an issue occurs during document generation.

Attributes:

GetAccess
public
SetAccess
public
NonCopyable
true

Data Types: char | string

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

Examples

collapse 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);

Version History

Introduced in R2014b