Main Content

mlreportgen.dom.TextOrientation class

Package: 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.

example

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

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

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

Attributes:

GetAccess
public
SetAccess
public
NonCopyable
true

Data Types: char | string

Tag for this document element, specified as a character vector or string scalar.

The DOM 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. Specifying your own tag value can help you to identify where an issue occurred during document generation.

Attributes:

GetAccess
public
SetAccess
public
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