Documentation

This is machine translation

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

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

mlreportgen.dom.FOProperty class

Package: mlreportgen.dom
Superclasses:

FO property for PDF output

Description

Creates an object that specifies an XML Style Sheet Language (XSL) Formatting Object (FO) property. The DOM API uses FO objects to format PDF output. Use this object with mlreportgen.FOProperties to apply FO properties not supported by DOM format objects. For more information, see w3.org/2002/08//XSLFOsummary.html.

Construction

prop = FOProperty(Name,Value) creates an FO format property having the specified name and value.

Input Arguments

expand all

FO property name, specified as a character vector.

Property value for the corresponding property name, specified as a character vector.

Output Arguments

expand all

FO format object, returned as an mlreportgen.dom.FOProperty object.

Properties

expand all

This read-only property lists child elements of this object.

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.

FO property name, specified as a character vector.

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

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.

Property value for the corresponding property name, specified as a character vector.

Examples

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

listbreak = FOProperty('break-before','page');
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(listbreak)};
append(d,list);

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

Introduced in R2016a

Was this topic helpful?