Format and Layout

Alignment, margins, page breaks, fonts, headers and footers

You can specify formatting by using Microsoft® Word, PDF, and HTML template formatting styles.

Classes

expand all

mlreportgen.report.ReportLayout Page layout of report
mlreportgen.report.ReporterLayout Layout for reporter
mlreportgen.dom.HAlignSpecify horizontal alignment of document object
mlreportgen.dom.VAlignVertical alignment of document object
mlreportgen.dom.HeightHeight of object
mlreportgen.dom.WidthObject width
mlreportgen.dom.StyleRefPlaceholder for reference to content with specified style name or outline level
mlreportgen.dom.InnerMarginMargin between content and bounding box
mlreportgen.dom.OuterMarginMargin between bounding box and its surroundings
mlreportgen.dom.NumPagesCreate placeholder for number of document pages
mlreportgen.dom.PageMarginsPage margins for Microsoft Word and PDF page layout
mlreportgen.dom.KeepLinesTogetherStart paragraph on new page if necessary
mlreportgen.dom.KeepWithNextKeep paragraph on same page as next
mlreportgen.dom.PageBreakCreate page break object
mlreportgen.dom.PageBreakBeforeStart paragraph on new page
mlreportgen.dom.WidowOrphanControlWidow and orphan handling
mlreportgen.dom.HorizontalRuleHorizontal line between report content
mlreportgen.dom.HyphenationEnable hyphenation
mlreportgen.dom.WhiteSpaceWhite space type
mlreportgen.dom.CharEntityCreate character entity reference
mlreportgen.dom.WatermarkAdd watermark to pages in sections of PDF reports
mlreportgen.dom.BackgroundColorBackground color of document element
mlreportgen.dom.FlowDirectionDirection of text or table column flow
mlreportgen.dom.DOCXPageLayoutPage format and layout for Microsoft Word document section
mlreportgen.dom.PDFPageLayoutPage format and layout for PDF document section
mlreportgen.dom.DOCXPageHeaderPage header definition for Microsoft Word document
mlreportgen.dom.DOCXPageFooterPage footer definition for Microsoft Word document
mlreportgen.dom.PDFPageHeaderPage header definition for PDF document
mlreportgen.dom.PDFPageFooterPage footer definition for PDF document
mlreportgen.dom.PageRawFormatXML markup for array of Microsoft Word formats
mlreportgen.dom.RawTextWord XML or HTML markup to insert in document
mlreportgen.dom.PageCreate page number placeholder
mlreportgen.dom.PageSizeSize and orientation of pages in Microsoft Word and PDF documents
mlreportgen.dom.DOCXPageSizeSize and orientation of pages in Microsoft Word document
mlreportgen.dom.NumPagesCreate placeholder for number of document pages
mlreportgen.dom.StyleRefPlaceholder for reference to content with specified style name or outline level
mlreportgen.dom.VerticalAlignVertical alignment of an inline document element
mlreportgen.dom.CSSPropertiesArray of CSS properties for formatting HTML output
mlreportgen.dom.CSSPropertyCSS property object for formatting HTML output
mlreportgen.dom.FOPropertiesArray of FO properties for formatting PDF output
mlreportgen.dom.FOPropertyFO property for PDF output

Topics

Report Formatting Approaches

Use style sheets, objects or properties to format a report

Create Page Layout Sections

Create report sections. Divide a Word or PDF report into sections with different layouts

Create Page Footers and Headers

Create footers and headers for a report

Set Page Margins in a Word Report

Define margins and header, footer, and gutter sizes for a DOCX page.

Set Page Margins in a PDF Report

Define margins and header, footer, and gutter sizes for a PDF page.

Use Style Sheet Styles

A style is a collection of formats that define the appearance of a document object, such as a paragraph, table, or list.

Style Sheet Cells for Headers and Footers

How to use style sheet cells to manage headers and footers in reports

Set Page Margins of a Microsoft Word Report

This example illustrates how to set the width of the page margins of a Microsoft Word report.

Create a Report With Landscape Pages

Generate a report that has landscape pages.

Create a Report With Portrait and Landscape Pages

Generate a report that has both portrait and landscape pages.

Format Inheritance

The DOM API allows you to use template-based styles and format object-based styles (or equivalent format properties) to specify the appearance of an object.

Configure PDF Fonts

For PDF output, MATLAB® Report Generator™ comes configured with default fonts: a serif, a sans serif, and dingbats.

Templates for DOM API Report Programs

Templates that provide default formatting for DOM API reports

What Is a Reporter?

Overview of reporters and how to use them, and Report and DOM APIs

Define New Types of Reporters

Create your own reporters

Subclass a Reporter Definition

Copy and edit a reporter based on a built-in reporter