Main Content

mlreportgen.dom.TextOrientation Class

Namespace: mlreportgen.dom

Orientation of text in a table entry

Description

Specifies the orientation for text in a table entry.

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

Creation

Description

textOrientationObj = TextOrientation causes text to flow from left to right and for the first column to be on the left side of a table.

textOrientationObj = TextOrientation(orientation) causes text in a table entry to display with the specified orientation.

example

Input Arguments

expand all

Text orientation, specified as one of these values:

  • "horizontal" — text is horizontal in the text entry

  • "down" — text is vertical, with the first character at the top

  • "up" — text is vertical, with the first character at the bottom

Properties

expand all

Text orientation of the table entry, specified as one of these values:

ValueDescription
"horizontal"Text orientation is horizontal.
"down"Text orientation is vertical, with the content rotated 90 degrees, clockwise.
"up"Text orientation is vertical, with the content rotated 90 degrees, counterclockwise.

Attributes:

GetAccess
public
SetAccess
public
NonCopyable
true

Data Types: char | string

Table entry rotated text width, 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

Example: "10px"

Note

This property applies only to PDF output.

Attributes:

GetAccess
public
SetAccess
public
NonCopyable
true

Data Types: string | char

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

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

Examples

collapse all

import mlreportgen.dom.*
d = Document("mydoc1","docx");

HeadStyle = {Bold,OuterMargin("0in")};
ch1 = Paragraph("Col1");
ch1.Style = HeadStyle;
ch2 = Paragraph("Col2");
ch2.Style = HeadStyle;

t = Table({ch1,ch2;"entry1","entry2"});
EntryStyle = {TextOrientation("down"),VAlign("middle")};
t.entry(1,1).Style = EntryStyle;
t.entry(1,2).Style = EntryStyle;
t.row(1).Style = {RowHeight("24pt","atleast")};
append(d,t);

close(d);
rptview(d.OutputPath);

Version History

Introduced in R2016a