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

Object identifier for the mlreportgen.dom.TextOrientation 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

Tag for the mlreportgen.dom.TextOrientation 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

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

Table entry rotated text width, specified as a string. This property applies only to PDF output. The width string is specified in the form valueUnits where Units is an abbreviation for the units. Valid abbreviations are:

  • "px" — pixels

  • "cm" — centimeters

  • "in" — inches

  • "mm" — millimeters

  • "pc" — picas

  • "pt" — points

Example: 10px

Data Types: 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