This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

mlreportgen.dom.FOProperties class

Package: mlreportgen.dom

Array of FO properties for formatting PDF output


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


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.


props = FOProperties(prop) creates an FOProperties object based on mlreportgen.dom.CSSProperty objects. The mlreportgen.dom.FOProperty object specifies the CSS format to use and its value.

Input Arguments

expand all

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

Output Arguments

expand all

FO properties, returned as an mlreportgen.dom.FOProperties object.


expand all

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

This read-only property lists the parent of this document element.

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

Tag for document element, specified as a character vector.

A session-unique ID is generated as part of document element creation. The generated tag has the form CLASS:ID, where CLASS is the class of the element and ID is the value of the Id property of the object. You can specify a tag to replace the generated tag.

For example, to make it easier to identify where an issue occurred during document generation, you can specify your own tag value.


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);


Introduced in R2016a