Page 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.report.HTMLModuleTabsCreate tabbed panels
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

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.

Customize the Page Size and Margins of a Word Report

Modify the page dimensions in the Word templates for the title page, table of contents, and chapter reporters.

Set Page Margins in a PDF Report

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

Customize the Page Size and Margins of a PDF Report

Modify the page dimensions in the PDF templates for the title page, table of contents, and chapter reporters.

Style Sheet Cells for Headers and Footers

Use style sheet cells to manage headers and footers in reports.

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.

Side-By-Side Figures

Arrange MATLAB figures next to each other on a page.

Side-By-Side Images

Arrange images next to each other on a page.

Scale Image To Fit Page

Use an mlreportgen.dom.ScaleToFit object to make an image fit on a page.

Center Figure Snapshot on a Page

Center a figure snapshot on a landscape page for PDF and Word reports.

Center Image on a Page

Center an image using an invisible 1-by-1 table that has the same size as the page body.

Center Formal Image in a PDF Report

Center a formal image using an invisible 1-by-1 table that has the same size as the page body.

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 provide default formatting for DOM API reports.

Report Formatting Approaches

Format a report by using style sheets, format objects, or format properties.

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.

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.