MATLAB Report Generator Release Notes


New Features, Bug Fixes

Scalable Report Generation: Generate PDF reports as big as 10,000 pages

In previous releases, the DOM API used Microsoft® Word to generate PDF documents from Word documents. In R2016a, the DOM API generates PDF documents directly. The direct-to-PDF capability allows you to programmatically generate large PDF documents on all platforms supported by MATLAB®. This release also adds a new output type to Report Explorer, Direct PDF (from template), based on the direct-to-PDF capability. The new output type speeds up PDF generation and expands and simplifies PDF formatting.

Direct-to-PDF allows you to use an HTML template to specify the fixed content and format of a report and holes for inserting generated content. The template can use a predefined set of HTML tags to specify a report's page layout, table of contents location, and the content of page headers and footers. You can also programmatically specify page layout, table of contents location, and page headers and footers. The DOM API automatically generates table of contents and page numbers. See Create an HTML or PDF Template.

Table of Contents: Add TOCs programmatically

In R2016a, you can create a placeholder for a table of contents in your DOM API report program. Use the mlreportgen.dom.TOC class to create the placeholder. For more information on creating a table of contents, see Create a Table of Contents.

Page Numbers: Create page number placeholders programmatically

In R2016a, you can create page number placeholders programmatically in Word and PDF reports. Previously you used only a template to create the placeholders. Updating a Word document replaces the placeholders with automatically generated page numbers. Closing a PDF DOM document similarly replaces the placeholders with automatically generated page numbers. For more information, see the mlreportgen.dom.Page class.

HTML Text Component: Convert HTML to Word or PDF

The new HTML Text component allows you to include HTML markup in a Report Explorer report. If you specify Word or PDF as the report output type, the included HTML text is converted to Word or PDF. The conversion preserves the text's HTML-specified format. You can enter the HTML text in the component or specify a file or workspace variable that contains the text.

pptview Function: Open PowerPoint presentation or convert it to PDF

The pptview function opens a PPT presentation in PowerPoint® on Windows or Apache OpenOffice™ on Linux. If you have Microsoft Office installed, you can also use this function to convert a PowerPoint presentation to PDF format.

Cross-Platform PDF Viewer: View PDF with built-in viewer

Previously, the Report Generator displayed PDF reports in Adobe® Acrobat® on Windows® and in the PDF viewer you specified on other platforms. In R2016a, the Report Generator displays PDF reports on the same built-in viewer on all platforms. This change avoids the need for you to interact with a new Acrobat security dialog box on Windows every time you display a report. You also do not need to set up a viewer on Linux® and Macintosh systems.

    Note:   The new PDF viewer does not display a report's bookmarks.

Functionality Being Removed or Changed

FunctionalityResultUse InsteadCompatibility Considerations
mlreportgen.dom.DOCXPageMargins classStill works for Microsoft Word outputmlreportgen.dom.PageMarginsTo prevent your code from being output dependent, replace instances of DOCXPageMargins with PageMargins.
mlreportgen.dom.DOCXPageSize classStill works for Word outputmlreportgen.dom.PageSizeReplace instances of DOCXPageSize with PageSize.
mlreportgen.dom.DOCXRawFormat classStill works for Word outputmlreportgen.dom.PageRawFormatReplace instances of DOCXRawFormat with PageRawFormat.
mlreportgen.dom.DOCXSection classStill works for Word outputmlreportgen.dom.DOCXPageLayout or mlreportgen.dom.PDFPageLayoutReplace instances of DOCXSection with DOCXPageLayout. If appropriate, add a PDFPageLayout object.
CurrentDOCXSection propertyStill works for Word outputCurrentPageLayoutReplace instances of CurrentDOCXSection property with CurrentPageLayout property.


New Features, Bug Fixes

Programmatic interface for adding content to PowerPoint presentations

You can use the PPT (PowerPoint) API to add generated content to an existing PowerPoint presentation or to create a complete PowerPoint presentation programmatically. Your presentation can capture dynamic information from a MATLAB program without you making manual updates to the presentation. To format the layout and general look of your presentation, use template slide masters, style layouts, and styles. To format specific presentation content, you can use the PPT API format objects and properties.

For examples of PPT API code, see:

DOM API object display options

For Microsoft Word reports, you can use an mlreportgen.dom.Display object to specify whether to display an mlreportgen.dom.Text object. For HTML reports, you can use a Display object to specify the how to display DOM objects such as text, paragraphs, images, list items. For HTML reports, some display options are:

  • Display as an inline or block element.

  • Display the element similar to a table column, table caption, list element, or a few other elements.

  • Suppress the display of the object.

For details, see mlreportgen.dom.Display.

DOM API horizontal rule

You can use an mlreportgen.dom.HorizontalRule object to specify a horizontal line to visually divide report content.


New Features, Bug Fixes

Support for appending HTML string or file to a Word or PDF report generated by the Document Object Model (DOM) API

You can append HTML markup or the contents of a whole HTML file to a programmatic report written with the Document Object Model (DOM) API to:

  • Convert an existing HTML report to a Microsoft Word or PDF report.

    You can append the HTML markup for a report to a DOM report, which you can then generate in Word or PDF format. For example, you can use a MATLAB printf statement to generate an HTML report file, and then append that HTML file to a DOM report to generate a PDF or Word version of the report. Another example is to convert a report generated by Model Advisor from HTML to Word or PDF.

  • Add content based on HTML markup.

    You can append the HTML code for a report to a DOM report, using the HTML code as a building block in a DOM report that includes other report elements.

Perform these steps to append HTML to a DOM report.

  1. Ensure that the HTML code complies with HTML standards, such as including beginning and end tags (for example, <p> and </p>). Consider using a utility such as HTML Tidy.

  2. In a DOM report, use addHTML to append HTML code or addHTMLFile to append an HTML file to a document or document part.

For example, this DOM code creates a Word report that displays Hello World, based on the HTML code that you append to the report.

d = Document('MyReport','docx');
addHTML(d,'<p style="color:blue"><b>Hello World</b></p>');

For information about using the addHTML or addHTMLFile methods, see mlreportgen.dom.Document.addHTML or mlreportgen.dom.Document.addHTMLFile.

Single-file output option for HTML reports generated by DOM API

To simplify display of an HTML report, you can specify that the DOM API generate the report as a single HTML file that includes the report images.

Specify 'html-file' for the type input argument for a Document or DocumentPart constructor. For details, see the mlreportgen.dom.Document reference page.

Simplified table formatting with DOM API

In R2015a, the DOM API includes several enhancements to simplify creating and formatting tables.

  • You can use an mlreportgen.dom.ResizeToFitContents format object in the Style property for mlreportgen.dom.Table or mlreportgen.dom.FormalTable objects. The ResizeToFitContents to specifies whether to whether to resize columns to fit the widest content in a column.

  • You can specify an mlreportgen.dom.Height format object in the Style property of an mlreportgen.dom.TableEntry object. The height of a row is the tallest height specified for a table entry in that row. If no entries in the row specify a height, then the row height is specified by the Height property of the TableRow object.

  • Table entries can now inherit the border formatting specified in a TableEntriesStyle property of mlreportgen.dom.Table or mlreportgen.dom.Table objects.

Container for generating high-level HTML elements

You can use the mlreportgen.dom.Container class to create high-level HTML elements not otherwise supported by the DOM API, such as div, section, or article.

You can also use a Container object to simulate format inheritance in Word reports.

For details, see mlreportgen.dom.Container.

Images and text for DOM report links

You can append text and images to mlreportgen.dom.ExternalLink and mlreportgen.dom.InternalLink objects.


New Features, Bug Fixes

Report formatting based on Word and HTML templates

You can use Microsoft Word or HTML templates for reports that you create using:

MATLAB report objects for creating report scripts

You can use the DOM (Document Object Model) API to create MATLAB programs to generate reports. The DOM API provides a set of objects for creating text, paragraphs, tables, images, lists, and other kinds of report content. When you create a report program, you can:

  • Produce Microsoft Word, HTML, and PDF output using the same code.

  • Specify formatting for report objects, such as color and bold for text objects.

  • Use format objects (for example, Bold and FontFamily) to format report objects.

  • Add MATLAB data directly to report objects (for example, a char array to a Text object).

  • Use formatting and fixed content that is defined in a Word or HTML template.

  • Create form–based reports that contain fixed and generated content.

  • Modularize a report into parts for generation of reports that have repetitive elements of the same format.

For information about how to create report programs, see Document Object Model.

Fast file converter with reduced memory requirements

Generate template-driven reports much faster than in previous releases, without using Java memory.

To take advantage of these performance advantages, use one of these File format report options:

  • HTML (from template)

  • PDF (from template)

  • Word (from template)

Zipped package option for HTML reports

You can use a zip file to package reports that use an HTML template. Zip file packaging compresses and consolidates the files. You can also package the HTML files as unzipped files or as both zipped and unzipped files.

Fill-in-the-blanks Word and HTML forms for generating reports

You can use the DOM (Document Object Model) report objects in a MATLAB program along with Word and HTML fill-in-the-blanks templates that contain fixed and holes to include generated content. The report program uses report objects to generate the variable information. See Form-Based Reporting.

Color settings preferences in MATLAB Comparison Tool

You can now change and save your diff color preferences for the MATLAB Comparison Tool. You can apply your color preferences when comparing text files, MAT-files, variables, zip files or folders.


New Features, Bug Fixes

OpenOffice support

On Linux and Macintosh platforms, the report output appears in Apache OpenOffice if you:

  • Set File format to either Word Document (RTF) or Rich Text Format

  • Enable View report generation

In the MATLAB Report Generator™ Preferences, the View command preference default now enables viewing the report in OpenOffice for Linux and Macintosh platforms.


Bug Fixes


Bug Fixes


Bug Fixes

Non-English character set report formats

The MATLAB Report Generator provides basic PDF font support for:

  • English

  • Japanese

  • Korean

  • Russian (Cyrillic)

You can use the language font map to:

  • Add or modify specifications for PDF font usage for supported non-English languages.

  • Create PDF font support for a non-supported language.

  • Change the default English fonts, if you do not specify a stylesheet.

The language font map specifications indicate what font to use on a specific platform (for example, Windows) for basic report elements such as body text. For details, see PDF Fonts for Non-English Platforms.


New Features, Bug Fixes, Compatibility Considerations

Enhanced Table Components

You can use the following new components to create and format a table:

Formatting options that the Table component and its child components support include:

  • Text color and alignment

  • Row background colors

  • Inclusion of images

  • Inclusion of hyperlinks

  • Table cells spanning columns and rows

You can conditionally control the content or format of a table.

For more information, see Table Formatting Components.

Compatibility Considerations

Releases earlier than R2012a included a different Table component. Starting in R2012a, that component is now called the Array-Based Table component.

The Array-Based Table component produces the same output, and has the same properties, as it did when it was called the Table component. The Array-Based Table component converts a rectangular array into a table and inserts the table into the report.

If a report that was created in a previous release already includes a Table component, the output is the same as in previous releases. To change property values for that component in R2012a or later, use the Array-Based Table dialog box.

Title Page Formatting Enhancements

For PDF and HTML reports, you can use the Stylesheet Editor to position title page elements (for example, title, copyright, and images) anywhere on the front or reverse side of the title page in any order. You can specify the size, color, weight, and slant of text elements.

Text Component Supports Subscripts and Superscripts

You can include a subscript or superscript in a paragraph, using a Text component.


New Features, Bug Fixes

Full Page Image Option for PDF Reports

To display full-page images in PDF reports, set the Paper orientation property to the new Full page image (PDF only) option. The following components provide this new option:

The Image component has a Full page image (PDF only) check box, which provides the same functionality as the Full page image (PDF only) property option.

Include Legal Notice, Report Creation Date, and Copyright on the Title Page

The Title Page component includes a new Display legal notice on title page check box. Use this option to include the legal notice, report creation date, and copyright information on the title page of reports that use PDF or Microsoft Word format.


New Features, Bug Fixes

Improved PDF Pagination

Reports generated using PDF output format produce better pagination, including:

  • Section titles are on the same page as the associated text (now section titles cannot appear as orphans at the bottom of a page).

  • Captions are on the same page as their associated images.

Export XML Comparison Results to the Workspace

You can now export XML comparison results to the MATLAB base workspace. You can use the results data for tasks such as further analysis or incorporating into different reports.

For details, see Export Results to the Workspace in the MATLAB Report Generator User's Guide.


New Features, Bug Fixes

Complete Text Included in Reports

Any component that displays text in reports now displays the whole text, without any truncation.

Linking to MATLAB Commands

Using the Link component, in a report you can now include a link that executes a MATLAB command.

Insert Variable Component Enhancements

The Insert Variable component includes several new options for specifying the content that the component displays and the table layout that the component uses.

Nest Setup File Component Supports Relative Links

The Nest Setup File component includes a new Link to external report is relative option, which makes the link to the nested report a relative link. This feature facilitates including a report on a Web site.

Enhanced Error Handling Code for Evaluate MATLAB Expression Component

The Evaluate MATLAB Expression component includes enhanced error handling code that you can easily customize (for example, the error handling code can stop report generation, with or without displaying an exception). The default error handling code now supports MATLAB class exception handling, using the evalException variable instead of lastError.

Transposable Columns for Handle Graphics Summary Table Component

For the Handle Graphics Summary Table component, use the new Transpose table check box to change the summary table rows into columns in the generated report. Specifying this option puts the property names in the first column and the values in the other columns.

Additional Date Format for Title Page Component

The Title Page component includes an additional date format for the Include report creation date field: yyyy/mm/dd.

Improved XML Comparison Report

Reports for comparisons of XML files have a new faster user interface, with changed parameters displayed in a separate panel for easier review. The enhanced report now has color highlighting for new and changed items.

For details, see Explore the XML Comparison Report in the MATLAB Report Generator User's Guide.


Bug Fixes


New Features, Bug Fixes, Compatibility Considerations

Stylesheets and Stylesheet Data Items Now Alphabetized

When you create or modify a stylesheet, the Report Explorer Options pane now alphabetically sorts the stylesheets and the data items in each stylesheet category.

Compatibility Considerations

The order in which a stylesheet or data item appears in a list may have changed from the order used in previous releases.

Improved Images in Word and RTF Reports on Windows Platforms

To provide better graphics quality in reports using the Word document format or RTF (Rich Text format) on Windows platforms, the default format for Handle Graphics® images is now Windows metafile format. The default had been black and white TIFF.

You can control the image format using the MATLAB preferences or the MATLAB Report Generator preferences, or from snapshot components such as the Axes Snapshot component.

Compatibility Considerations

To change the image format back to the previous default of black and white TIFF, change the preferences.

Required Products Information for MATLAB/Toolbox Version Number Component

The MATLAB/Toolbox Version Number component now supports options to display information based on whether a Simulink model or Stateflow chart requires a MathWorks™ product. This feature does not apply to reports on MATLAB or toolbox code.

Adobe Illustrator Image File Format No Longer Supported

Compatibility Considerations

The Image file format options for the Axes Snapshotand the Figure Snapshotcomponents no longer include Adobe Illustrator. If you wish to integrate a MATLAB Report Generator image into Adobe Illustrator, specify a image file format supported by Adobe Illustrator, such as PDF, and then open the image file in Adobe Illustrator.

Navigation Controls for XML Comparison Report

The XML comparison report has new navigation controls to step through differences in the report. You can use the toolbar buttons or the XML menu to move to the next or previous group of changes.

For details, see Explore the XML Comparison Report in the MATLAB Report Generator User's Guide.


No New Features or Changes


New Features, Bug Fixes

Comparison of XML Files

New comparison report for pairs of XML files.

For details, see Comparing XML Files in the MATLAB Report Generator documentation.

See also the following new example: mlxml_testplan.


Bug Fixes


Bug Fixes


New Features, Bug Fixes

Text Formatting Options for Title Page, Text, and Paragraph Components

This release includes new text formatting options for the Title Page, Text, and Paragraph components.

For more information, see the MATLAB Report Generator documentation.


Bug Fixes


Bug Fixes


Bug Fixes


New Features, Bug Fixes, Compatibility Considerations

User Interface and Performance Enhanced

The Report Explorer interface has a number of enhancements. The View menu has commands to increase and decrease font size and to show the message window if it is not displayed.

MATLAB Report Generator performance has improved. Reports are often generated more rapidly and with less chance of running out of memory.

XML File Format Changed

The format of XML files has changed in V3.0 (R2006a).

Compatibility Considerations

In V3.0 (R2006a), Report Explorer and the rptconvert command can convert XML files produced by the report generation process in V2.3.1 (R14SP3) and previous versions. However, in V2.3.1 (R14SP3) and previous versions, Report Explorer and the rptconvert command cannot convert XML files produced by the report generation process in V3.0 (R2006a).


New Features, Bug Fixes

Stylesheets Modify PDF Headers and Footers

This release adds support for modifying the content of headers and footers in PDF reports. This feature is implemented using stylesheet cells and cell groups. A cell group contains one or more stylesheet cells. A stylesheet cell is a set of values that determine the content of a particular portion of the header or footer for a page.

Two cell groups, Header Content and Footer Content, are available for PDF reports. You can use templates to specify XML code that defines the content for a header or footer.


New Features, Bug Fixes

Stylesheet Editor

You can use the Stylesheet Editor to customize the formatting of your HTML, PDF, and Word documents. For example, you can specify fonts, paper layout, table presentation, as well as other characteristics of your final report.

Customizing reports by editing stylesheets gives you the flexibility to create reports that conform to corporate style guidelines and requirements.

To open the Stylesheet Editor, right-click Report Generator in the Outline pane of the Report Explorer and then click Edit Stylesheet on the shortcut menu, as shown:

For more information about using the Stylesheet Editor, see Create Custom Stylesheets in the MATLAB Report Generator documentation.

Table Cell Spanning

You can create advanced table layouts for property tables. The advanced layouts include cells that span multiple rows or columns.

Generating Microsoft Word Documents as .doc Files

You can generate reports that are saved as Microsoft Word documents with the .doc extension. You can also convert XML source files that are generated by the report generation process to .doc files.

The reports you create are easier to distribute via e-mail, to share with others, and to manage.

You must have Microsoft Word software installed to use this feature, and you must be running the MATLAB Report Generator software on a Microsoft Windows system.

To use this feature select Word Document from the Stylesheet drop-down list in the Convert Source File dialog box, as shown:

Improved Graphical User Interface

This version of the MATLAB Report Generator software has the following changes and improvements to the graphical user interface:

  • The File Converter has a Source File drop-down list. Click Browse to navigate to a folder to select a source file. The default folder is the current folder.

  • In the File Converter, you can select a stylesheet from the drop-down list and click Edit to open the Stylesheet Editor.

  • An improved mechanism detects and displays errors that occur when you attempt to add a component that makes the style hierarchy invalid. Users of earlier versions may notice that warnings are now issued for components that had no problems in earlier versions. In this release, warning messages contain instructions about how to fix the problem.

  • The Figure Screen Capture component has been improved to capture window decorations such as menus, title bars, and toolbars.

Compatibility Summary

ReleaseFeatures or Changes with Compatibility Considerations
R2012aEnhanced Table Components
R2006aXML File Format Changed
Was this topic helpful?