Main Content

mlreportgen.dom.FOProperties Class

Namespace: mlreportgen.dom

Array of FO properties for formatting PDF output

Description

Creates an object that contains one or more Extensible Stylesheet Language (XSL) formatting objects (FO) for PDF output. Specify the formats using mlreportgen.dom.FOProperty. For information on FO properties, see www.w3.org/2002/08/XSLFOsummary.html.

Note

Use FOProperties objects only for FO properties not supported by other DOM format objects. Most DOM format objects work for all output types. Using FOProperty objects makes your report application specific to PDF output.

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

Creation

Input Arguments

expand all

FO property, specified as anmlreportgen.dom.FOProperty object or as an array or cell array of mlreportgen.dom.FOProperty objects.

Properties

expand all

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

Parent of mlreportgen.dom.FOProperties object, specified as a document element object. A document element must have only one parent.

Attributes:

SetAccess
private
NonCopyable
true

FO properties, specified as an array of mlreportgen.dom.FOProperty objects.

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

Examples

collapse all

This example shows how to apply an FO property to a List object. Using the DOM API, you can set a page break property on a paragraph using PageBreakBefore. However, you cannot use the PageBreakBefore property on a list. Instead, for PDF output, you can use the FO property 'break-before' with the value 'page'.

import mlreportgen.dom.*

d = Document('Break Before List','pdf');

p = Paragraph('First Page');
p.Style = {PageBreakBefore};
append(d, p);

p = Paragraph('Second Page');
p.Style = {PageBreakBefore};
append(d, p);

list = UnorderedList({'Earl Grey','Jasmine','Honeybush'});
list.Style = {FOProperties(FOProperty('break-before','page'))};
append(d, list);

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

Version History

Introduced in R2016a