Main Content

mlreportgen.dom.KeepWithNext Class

Namespace: mlreportgen.dom

Keep document element on same page as next

Description

Use objects of the mlreportgen.dom.KeepWithNext class to keep a document element on the same page as the document element that follows it. This format applies to Microsoft® Word and PDF documents.

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

Creation

Description

obj = KeepWithNext keeps the document element on the same page as the document element that follows it. The document element must be a paragraph, table row, or list item.

obj = KeepWithNext(onOff) sets the Value property to onOff.

Properties

expand all

Object identifier for the mlreportgen.dom.KeepWithNext object, specified as a character vector or string scalar. The DOM API generates a session-unique identifier when it creates the document element object. You can specify your own value for Id.

Attributes:

NonCopyable
true

Data Types: char | string

Strength that the document elements stay together on the same page, specified as "always" or an integer. When you specify the property as "always", the DOM object always keeps the document elements together on the same page. When you specify the property as a positive integer, the size of the integer dictates the strength that the document elements stay together. The greater the integer, the less likely the document elements appear on separate pages.

Attributes:

NonCopyable
true

Data Types: single | double | int8 | int16 | int32 | int64 | uint8 | uint16 | uint32 | uint64 | char | string

Tag for the mlreportgen.dom.KeepWithNext object, 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. Specify your own tag value to help you identify where to look when an issue occurs during document generation.

Attributes:

NonCopyable
true

Data Types: char | string

Whether to keep the document element on the same page as the following document element, specified as a numeric or logical 1 (true) or 0 (false). When this property is true, the object keeps the document elements on the same page according to the value of the Strength property.

Attributes:

NonCopyable
true

Data Types: logical

Version History

Introduced in R2014b