mlreportgen.dom.PageBorder Class
Namespace: mlreportgen.dom
Description
Use an object of the mlreportgen.dom.PageBorder
class to specify page
borders for Microsoft® Word and PDF reports.
The mlreportgen.dom.PageBorder
class is a handle
class.
Class Attributes
ConstructOnLoad | true |
HandleCompatible | true |
For information on class attributes, see Class Attributes.
Creation
Description
creates a pageBorder
= mlreportgen.dom.PageBorderPageBorder
object with default properties where the border
segments are solid, black, and 0.5 points wide, the top and bottom segments are one point
from the page margins, and the left and right segments are four points from the page
margins.
specifies the default style for all border segments.pageBorder
= mlreportgen.dom.PageBorder(style
)
Input Arguments
Type of border to draw, specified as one of the values in the table. This argument sets the Style property.
Border Style | Description | Supported in Microsoft Word | Supported in HTML and PDF |
---|---|---|---|
"dashed" | Dashed line | yes | yes |
"dashdotstroked" | Line with alternating diagonal dashes and dot | yes | yes |
"dashsmallgap" | Dashed line with a small gap between dashes | yes | yes |
"dotted" | Dotted line | yes | yes |
"dotdash" | Line with alternating dots and dashes | yes | no |
"dotdotdash" | Line with alternating double dots and a dash | yes | no |
"double" | Double line | yes | yes |
"doublewave" | Double wavy line | yes | no |
"groove" | 3-D effect grooved line | no | yes |
"hidden" | No line When there is a conflicting border style, the
| no | yes |
"inset" | 3-D effect line | no | yes |
"none" | No line When there is a conflicting border style, the
conflicting border style takes precedence over | yes | yes |
"outset" | 3-D effect line | yes | yes |
"ridge" | 3-D effect ridged line | no | yes |
"single" | Single line | yes | yes |
"solid" | Single line | no | yes |
"thick" | Thick line | yes | no |
"thickthinlargegap" | Dashed line with alternating thick and thin dashes with a large gap | yes | no |
"thickthinmediumgap" | Dashed line with alternating thick and thin dashes with a medium gap | yes | no |
"thickthinsmallgap" | Dashed line with alternating thick and thin dashes with a small gap | yes | no |
"thinthicklargegap" | Dashed line with alternating thin and thick dashes with a large gap | yes | no |
"thinthickmediumgap" | Dashed line with alternating thin and thick dashes with a medium gap | yes | no |
"thinthicksmallgap" | Dashed line with alternating thin and thick dashes with a small gap | yes | no |
"thinthickthinlargegap" | Dashed line with alternating thin and thick dashes with a large gap | yes | no |
"thinthickthinmediumgap" | Dashed line with alternating thin and thick dashes with a medium gap | yes | no |
"thinthickthinsmallgap" | Dashed line with alternating thin and thick dashes with a small gap | yes | no |
"threedemboss" | Embossed effect line | yes | no |
"threedengrave" | Engraved effect line | yes | no |
"triple" | Triple line | yes | no |
"wave" | Wavy line | yes | no |
Note
For Microsoft Word reports, when you assign an mlreportgen.dom.Border
object to
the Style
property of an
mlreportgen.dom.TableHeaderEntry
,
mlreportgen.dom.TableEntry
, or
mlreportgen.dom.HorizontalRule
object, the reporter does not support
"inset"
or "outset"
styles for this
property.
Color of the border, specified as a character vector or string scalar that contains a CSS color name or hexadecimal RGB value.
To use the name of a color, specify a CSS color name. For a list of CSS color names, seehttps://www.w3.org/wiki/CSS/Properties/color/keywords.
To specify a hexadecimal RGB format, use
#
as the first character and two-digit hexadecimal numbers for the red, green, and blue values. For example,"#0000ff"
specifies blue.
Example: "blue"
Example: "#0000ff"
This argument sets the Color property.
Width of the border, specified as character vector or string scalar that contains
a number followed by an abbreviation for a unit of measurement. For example,
"3pt"
specifies three points. Valid abbreviations are:
"px"
— Pixels"cm"
— Centimeters"in"
— Inches"mm"
— Millimeters"pc"
— Picas"pt"
— Points
Example: "3pt"
specifies three points.
This argument sets the Width property.
Note
Microsoft Word has additional border width limitations:
Microsoft Word limits the width of borders to the range of
0.25pt
to6pt
. Out of range width assignments trigger a warning or error message depending on your chosen border style.Along with the range limit, these border styles have additional limitations:
"dashdotstroked"
:3pt
"doublewave"
:0.75pt
"thinthickthinmediumgap"
:0.25–4.5pt
"thinthickthinsmallgap"
:1.5–6pt
"threedemboss"
:0.75–6pt
"threedengrave"
:0.75–6pt
"triple"
:0.5–3pt
"wave"
:0.75–1.5pt
Default margin of the page border segments, specified as a character vector or
string scalar that contains a number followed by an abbreviation for a unit of
measurement. For example, "10pt"
specifies ten points. Valid
abbreviations are:
"px"
— Pixels"cm"
— Centimeters"in"
— Inches"mm"
— Millimeters"pc"
— Picas"pt"
— Points
For PDF documents, the margin of a border segment is the space between the segment
and the page margin. For Word documents, the margin of a border segment is the space
between the segment and the page margin or between the segment and the edge of the
page, depending on the value of the MeasureFrom
property.
For Word documents, the Margin
value must between 0 points
and 31 points, or the equivalent value using other units of measurement.
This argument sets the Margin property.
Example: "10pt"
specifies 10 points
Properties
Default style of the page border segments, specified as one of these values:
Border Style | Description | Supported in Microsoft Word | Supported in PDF |
---|---|---|---|
"dashed" | Dashed line | yes | yes |
"dashdotstroked" | Line with alternating diagonal dashes and dot | yes | yes |
"dashsmallgap" | Dashed line with a small gap between dashes | yes | yes |
"dotted" | Dotted line | yes | yes |
"dotdash" | Line with alternating dots and dashes | yes | no |
"dotdotdash" | Line with alternating double dots and a dash | yes | no |
"double" | Double line | yes | yes |
"doublewave" | Double wavy line | yes | no |
"groove" | 3-D effect grooved line | no | yes |
"hidden" | No line When there is a conflicting border style, the
| no | yes |
"inset" | 3-D effect line | no | yes |
"none" | No line When there is a conflicting border style, the
conflicting border style takes precedence over | yes | yes |
"outset" | 3-D effect line | yes | yes |
"ridge" | 3-D effect ridged line | no | yes |
"single" | Single line | yes | yes |
"solid" | Single line | no | yes |
"thick" | Thick line | yes | no |
"thickthinlargegap" | Dashed line with alternating thick and thin dashes with a large gap | yes | no |
"thickthinmediumgap" | Dashed line with alternating thick and thin dashes with a medium gap | yes | no |
"thickthinsmallgap" | Dashed line with alternating thick and thin dashes with a small gap | yes | no |
"thinthicklargegap" | Dashed line with alternating thin and thick dashes with a large gap | yes | no |
"thinthickmediumgap" | Dashed line with alternating thin and thick dashes with a medium gap | yes | no |
"thinthicksmallgap" | Dashed line with alternating thin and thick dashes with a small gap | yes | no |
"thinthickthinlargegap" | Dashed line with alternating thin and thick dashes with a large gap | yes | no |
"thinthickthinmediumgap" | Dashed line with alternating thin and thick dashes with a medium gap | yes | no |
"thinthickthinsmallgap" | Dashed line with alternating thin and thick dashes with a small gap | yes | no |
"threedemboss" | Embossed effect line | yes | no |
"threedengrave" | Engraved effect line | yes | no |
"triple" | Triple line | yes | no |
"wave" | Wavy line | yes | no |
Attributes:
GetAccess | public |
SetAccess | public |
NonCopyable | true |
Data Types: char
| string
Color of the border segments, specified as a character vector or string scalar that contains a CSS color name or hexadecimal RGB value.
To use the name of a color, specify a CSS color name. For a list of CSS color names, seehttps://www.w3.org/wiki/CSS/Properties/color/keywords.
To specify a hexadecimal RGB format, use
#
as the first character and two-digit hexadecimal numbers for the red, green, and blue values. For example,"#0000ff"
specifies blue.
Example: "blue"
Example: "#0000ff"
Attributes:
GetAccess | public |
SetAccess | public |
NonCopyable | true |
Data Types: char
| string
Default width of the page border segments, specified as a character vector or string
scalar that contains a number followed by an abbreviation for a unit of measurement. For
example, "1pt"
specifies one point. Valid abbreviations
are:
"px"
— Pixels"cm"
— Centimeters"in"
— Inches"mm"
— Millimeters"pc"
— Picas"pt"
— Points
Note
Microsoft Word has additional border width limitations:
Microsoft Word limits the width of borders to the range of
0.25pt
to6pt
. Out of range width assignments trigger a warning or error message depending on your chosen border style.Along with the range limit, these border styles have additional limitations:
"dashdotstroked"
:3pt
"doublewave"
:0.75pt
"thinthickthinmediumgap"
:0.25–4.5pt
"thinthickthinsmallgap"
:1.5–6pt
"threedemboss"
:0.75–6pt
"threedengrave"
:0.75–6pt
"triple"
:0.5–3pt
"wave"
:0.75–1.5pt
Example: "0.5pt"
Attributes:
GetAccess | public |
SetAccess | public |
NonCopyable | true |
Data Types: char
| string
Default margin of the page border segments, specified as a character vector or
string scalar that contains a number followed by an abbreviation for a unit of
measurement. For example, "10pt"
specifies ten points. Valid abbreviations
are:
"px"
— Pixels"cm"
— Centimeters"in"
— Inches"mm"
— Millimeters"pc"
— Picas"pt"
— Points
For PDF documents, the margin of a border segment is the space between the segment
and the page margin. For Word documents, the margin of a border segment is the space
between the segment and the page margin or between the segment and the edge of the page,
depending on the value of the MeasureFrom
property.
For Word documents, the Margin
value must between 0 points and
31 points, or the equivalent value using other units of measurement.
Example: "10pt"
specifies 10 points
Attributes:
GetAccess | public |
SetAccess | public |
NonCopyable | true |
Data Types: char
| string
Whether to measure border position from the edge of the page or the edge of the
text, specified as "pageboundary"
or "text"
. The
"pageboundary"
value applies only to Word documents. For a PDF
document, the page border is always measured from the page margin.
If the value is "text"
, the Margin
,
TopMargin
, LeftMargin
, BottomMargin
, and RightMargin
properties specify the distance between a border segment and
the page margin. For example, in this Word document, the page margin is one inch and the
border is twenty points from the page margin.
If the value is "pageboundary"
, the value of the
Margin
, TopMargin
,
LeftMargin
, BottomMargin
, and
RightMargin
properties specify the distance between the border
and the edge of the page. For example, the border is 20 points from the edge of the page
in this Word document:
Attributes:
GetAccess | public |
SetAccess | public |
NonCopyable | true |
Data Types: char
| string
Whether the page border surrounds the header region, specified as
true
or false
. This property applies to PDF
documents or to Word documents when the MeasureFrom
property is set to "text"
.
If the value is true
, the border surrounds the header. For
example, the border surrounds the header in this Word document:
If the value is false
, the border does not surround the header.
For example, The border does not surround the header in this Word document:
Note
For Word documents with multiple sections, a false
value for
the SurroundHeader
property applies to all sections of the
document. If you specify that a page border does not surround the header for one
section of the document, a page border does not surround the header for any
section.
Attributes:
GetAccess | public |
SetAccess | public |
NonCopyable | true |
Data Types: logical
Whether the page border surrounds the footer region, specified as
true
or false
. This property applies to PDF
documents or to Word documents when the MeasureFrom
property is set to "text"
.
If the value is true
, the border surrounds the footer. For
example, the border surrounds the footer in this Word document:
If the value is false
, the border does not surround the footer.
For example, the border does not surround the footer in this Word document:
Note
For Word documents with multiple sections, a false
value for
the SurroundFooter
property, or the equivalent setting in a
template, applies to all sections of the document. If you specify that a page border
does not surround the footer for one section of the document, a page border does not
surround the footer for any section.
Attributes:
GetAccess | public |
SetAccess | public |
NonCopyable | true |
Data Types: logical
Style of the top page border segment, specified as one of these values in the table
in the style
argument.
Attributes:
GetAccess | public |
SetAccess | public |
NonCopyable | true |
Data Types: char
| string
Color of the top border segment, specified as a character vector or string scalar that contains a CSS color name or hexadecimal RGB value.
To use the name of a color, specify a CSS color name. For a list of CSS color names, seehttps://www.w3.org/wiki/CSS/Properties/color/keywords.
To specify a hexadecimal RGB format, use
#
as the first character and two-digit hexadecimal numbers for the red, green, and blue values. For example,"#0000ff"
specifies blue.
Example: "blue"
Example: "#0000ff"
Attributes:
GetAccess | public |
SetAccess | public |
NonCopyable | true |
Data Types: char
| string
Width of the top border segment, specified as a character vector or string scalar
that contains a number followed by an abbreviation for a unit of measurement. For
example, "1pt"
specifies one point. Valid abbreviations
are:
"px"
— Pixels"cm"
— Centimeters"in"
— Inches"mm"
— Millimeters"pc"
— Picas"pt"
— Points
Note
Microsoft Word has additional border width limitations:
Microsoft Word limits the width of borders to the range of
0.25pt
to6pt
. Out of range width assignments trigger a warning or error message depending on your chosen border style.Along with the range limit, these border styles have additional limitations:
"dashdotstroked"
:3pt
"doublewave"
:0.75pt
"thinthickthinmediumgap"
:0.25–4.5pt
"thinthickthinsmallgap"
:1.5–6pt
"threedemboss"
:0.75–6pt
"threedengrave"
:0.75–6pt
"triple"
:0.5–3pt
"wave"
:0.75–1.5pt
Example: "1pt"
Attributes:
GetAccess | public |
SetAccess | public |
NonCopyable | true |
Data Types: char
| string
Margin of the top border segment, specified as a character vector or string scalar
that contains a number followed by an abbreviation for a unit of measurement. For
example, "10pt"
specifies ten points. Valid abbreviations are:
"px"
— Pixels"cm"
— Centimeters"in"
— Inches"mm"
— Millimeters"pc"
— Picas"pt"
— Points
For PDF documents, the margin of a border segment is the space between the segment
and the page margin. For Word documents, the margin of a border segment is the space
between the segment and the page margin or between the segment and the edge of the page,
depending on the value of the MeasureFrom
property.
For Word documents, the TopMargin
value must between 0 points
and 31 points, or the equivalent value using other units of measurement.
Example: "10pt"
specifies 10 points
Attributes:
GetAccess | public |
SetAccess | public |
NonCopyable | true |
Data Types: char
| string
Style of the left border segment, specified as one of these values in the table in
the style
argument.
Attributes:
GetAccess | public |
SetAccess | public |
NonCopyable | true |
Data Types: char
| string
Color of the left border segment, specified as a character vector or string scalar that contains a CSS color name or hexadecimal RGB value.
To use the name of a color, specify a CSS color name. For a list of CSS color names, seehttps://www.w3.org/wiki/CSS/Properties/color/keywords.
To specify a hexadecimal RGB format, use
#
as the first character and two-digit hexadecimal numbers for the red, green, and blue values. For example,"#0000ff"
specifies blue.
Example: "blue"
Example: "#0000ff"
Attributes:
GetAccess | public |
SetAccess | public |
NonCopyable | true |
Data Types: char
| string
Width of the left border segment, specified as a character vector or string scalar
that contains a number followed by an abbreviation for a unit of measurement. For
example, "1pt"
specifies one point. Valid abbreviations
are:
"px"
— Pixels"cm"
— Centimeters"in"
— Inches"mm"
— Millimeters"pc"
— Picas"pt"
— Points
Note
Microsoft Word has additional border width limitations:
Microsoft Word limits the width of borders to the range of
0.25pt
to6pt
. Out of range width assignments trigger a warning or error message depending on your chosen border style.Along with the range limit, these border styles have additional limitations:
"dashdotstroked"
:3pt
"doublewave"
:0.75pt
"thinthickthinmediumgap"
:0.25–4.5pt
"thinthickthinsmallgap"
:1.5–6pt
"threedemboss"
:0.75–6pt
"threedengrave"
:0.75–6pt
"triple"
:0.5–3pt
"wave"
:0.75–1.5pt
Example: "0.5pt"
Attributes:
GetAccess | public |
SetAccess | public |
NonCopyable | true |
Data Types: char
| string
Margin of the left border segment, specified as a character vector or string scalar
that contains a number followed by an abbreviation for a unit of measurement. For
example, "10pt"
specifies ten points. Valid abbreviations
are:
"px"
— Pixels"cm"
— Centimeters"in"
— Inches"mm"
— Millimeters"pc"
— Picas"pt"
— Points
For PDF documents, the margin of a border segment is the space between the segment
and the page margin. For Word documents, the margin of a border segment is the space
between the segment and the page margin or between the segment and the edge of the page,
depending on the value of the MeasureFrom
property.
For Word documents, the LeftMargin
value must between 0 points
and 31 points, or the equivalent value using other units of measurement.
Example: "10pt"
specifies 10 points
Attributes:
GetAccess | public |
SetAccess | public |
NonCopyable | true |
Data Types: char
| string
Style of the bottom border segment, specified as one of these values in the table in
the style
argument.
Attributes:
GetAccess | public |
SetAccess | public |
NonCopyable | true |
Data Types: char
| string
Color of the bottom border segment, specified as a character vector or string scalar that contains a CSS color name or hexadecimal RGB value.
To use the name of a color, specify a CSS color name. For a list of CSS color names, seehttps://www.w3.org/wiki/CSS/Properties/color/keywords.
To specify a hexadecimal RGB format, use
#
as the first character and two-digit hexadecimal numbers for the red, green, and blue values. For example,"#0000ff"
specifies blue.
Example: "blue"
Example: "#0000ff"
Attributes:
GetAccess | public |
SetAccess | public |
NonCopyable | true |
Data Types: char
| string
Width of the bottom border segment, specified as a character vector or string scalar
that contains a number followed by an abbreviation for a unit of measurement. For
example, "1pt"
specifies one point. Valid abbreviations
are:
"px"
— Pixels"cm"
— Centimeters"in"
— Inches"mm"
— Millimeters"pc"
— Picas"pt"
— Points
Note
Microsoft Word has additional border width limitations:
Microsoft Word limits the width of borders to the range of
0.25pt
to6pt
. Out of range width assignments trigger a warning or error message depending on your chosen border style.Along with the range limit, these border styles have additional limitations:
"dashdotstroked"
:3pt
"doublewave"
:0.75pt
"thinthickthinmediumgap"
:0.25–4.5pt
"thinthickthinsmallgap"
:1.5–6pt
"threedemboss"
:0.75–6pt
"threedengrave"
:0.75–6pt
"triple"
:0.5–3pt
"wave"
:0.75–1.5pt
Example: "1pt"
Attributes:
GetAccess | public |
SetAccess | public |
NonCopyable | true |
Data Types: char
| string
Margin of the bottom border segment, specified as a character vector or string
scalar that contains a number followed by an abbreviation for a unit of measurement.
For example, "10pt"
specifies ten points. Valid abbreviations are:
"px"
— Pixels"cm"
— Centimeters"in"
— Inches"mm"
— Millimeters"pc"
— Picas"pt"
— Points
For PDF documents, the margin of a border segment is the space between the segment
and the page margin. For Word documents, the margin of a border segment is the space
between the segment and the page margin or between the segment and the edge of the page,
depending on the value of the MeasureFrom
property.
For Word documents, the BottomMargin
value must between 0
points and 31 points, or the equivalent value using other units of measurement.
Example: "10pt"
specifies 10 points
Attributes:
GetAccess | public |
SetAccess | public |
NonCopyable | true |
Data Types: char
| string
Style of the right border segment, specified as one of these values in the table in
the style
argument.
Attributes:
GetAccess | public |
SetAccess | public |
NonCopyable | true |
Data Types: char
| string
Color of the right border segment, specified as a character vector or string scalar that contains a CSS color name or hexadecimal RGB value.
To use the name of a color, specify a CSS color name. For a list of CSS color names, seehttps://www.w3.org/wiki/CSS/Properties/color/keywords.
To specify a hexadecimal RGB format, use
#
as the first character and two-digit hexadecimal numbers for the red, green, and blue values. For example,"#0000ff"
specifies blue.
Example: "blue"
Example: "#0000ff"
Attributes:
GetAccess | public |
SetAccess | public |
NonCopyable | true |
Data Types: char
| string
Width of the right border segment, specified as a character vector or string scalar
that contains a number followed by an abbreviation for a unit of measurement. For
example, "1pt"
specifies one point. Valid abbreviations
are:
"px"
— Pixels"cm"
— Centimeters"in"
— Inches"mm"
— Millimeters"pc"
— Picas"pt"
— Points
Note
Microsoft Word has additional border width limitations:
Microsoft Word limits the width of borders to the range of
0.25pt
to6pt
. Out of range width assignments trigger a warning or error message depending on your chosen border style.Along with the range limit, these border styles have additional limitations:
"dashdotstroked"
:3pt
"doublewave"
:0.75pt
"thinthickthinmediumgap"
:0.25–4.5pt
"thinthickthinsmallgap"
:1.5–6pt
"threedemboss"
:0.75–6pt
"threedengrave"
:0.75–6pt
"triple"
:0.5–3pt
"wave"
:0.75–1.5pt
Example: "1pt"
Attributes:
GetAccess | public |
SetAccess | public |
NonCopyable | true |
Data Types: char
| string
Margin of the right border segment, specified as a character vector or string scalar
that contains a number followed by an abbreviation for a unit of measurement. For
example, "10pt"
specifies ten points. Valid abbreviations are:
"px"
— Pixels"cm"
— Centimeters"in"
— Inches"mm"
— Millimeters"pc"
— Picas"pt"
— Points
For PDF documents, the margin of a border segment is the space between the segment
and the page margin. For Word documents, the margin of a border segment is the space
between the segment and the page margin or between the segment and the edge of the page,
depending on the value of the MeasureFrom
property.
For Word documents, the RightMargin
value must between 0
points and 31 points, or the equivalent value using other units of measurement.
Example: "10pt"
specifies 10 points
Attributes:
GetAccess | public |
SetAccess | public |
NonCopyable | true |
Data Types: char
| string
Tag, specified as a character vector or string scalar. The DOM API generates a
session-unique tag as part of the creation of this object. The generated tag has the
form CLASS:ID
, where
CLASS
is the object class and
ID
is the value of the
Id
property of the object. Use this value to help identify
where an issue occurs during document generation.
Attributes:
GetAccess | public |
SetAccess | public |
NonCopyable | true |
Data Types: char
| string
Object identifier, specified as a character vector or string scalar. The DOM API generates a session-unique identifier when it creates the document element object.
Attributes:
GetAccess | public |
SetAccess | public |
NonCopyable | true |
Data Types: char
| string
Examples
This example generates a Microsoft Word document that has solid, red, 0.5-point borders positioned 20 points from the page boundary.
Import the DOM API namespace so that you do not have to use long, fully qualified class names.
import mlreportgen.dom.*;
Create a Word document.
d = Document("myDocument","docx"); open(d);
Create a PageBorder
object and specify the border style, color, and width.
pageBorder = PageBorder("solid","red","0.5pt");
Specify that the border position is relative to the page boundary and specify the margin between the page boundary and the border.
pageBorder.MeasureFrom ="pageboundary"; pageBorder.Margin = "20pt";
Set the PageBorder
property of the layout associated with the document to the PageBorder
object.
d.CurrentPageLayout.PageBorder = pageBorder;
Add text to the document. Close and view the document.
append(d,"The solid, red, 0.5-point border is" + ... " 20 points from the page boundary."); close(d); rptview(d);
This example generates a PDF document that has solid, red, 0.5-point borders positioned 20 points from the page margins.
Import the DOM API namespace so that you do not have to use long, fully qualified class names.
import mlreportgen.dom.*;
Create a PDF document.
d = Document("myDocument","pdf"); open(d);
Create a PageBorder
object and specify the style, color, width, and margin for all border segments. For PDF documents, the margin of a border segment specifies the distance between the segment and the page margin.
pageBorder = PageBorder("solid","red","0.5pt","20pt");
Set the PageBorder
property of the layout associated with the document to the PageBorder
object.
d.CurrentPageLayout.PageBorder = pageBorder;
Add text to the document. Close and view the document.
append(d,"The solid, red, 0.5-point border segments" +... "are twenty points from the margins."); close(d); rptview(d);
This example uses the Report API to generate a Word or PDF report that has red page borders on the title page and blue page borders on the other sections of the report.
Import the Report API and DOM API packages so that you do not have to use long, fully qualified class names.
import mlreportgen.report.*; import mlreportgen.dom.*;
Create a Word report and specify solid, blue, 0.5-point default borders for all pages of the report. For a PDF report, replace "docx"
with "pdf"
.
rpt = Report("myreport","docx"); rpt.Layout.PageBorder = PageBorder("solid","blue","0.5pt");
Create a title page and specify solid, red, 0.5-point borders for the title page. Append the title page to the report.
tp = TitlePage("Title","My Report"); tp.Layout.PageBorder = PageBorder("solid","red","0.5pt"); append(rpt,tp);
Create a chapter and append it to the report.
ch = Chapter("My Chapter");
append(rpt,ch);
Close and view the report.
close(rpt); rptview(rpt);
In the generated report, the title page has red borders as specified by the title page reporter layout.
The chapter pages have the default blue borders because the chapter reporter layout did not specify page borders.
Version History
Introduced in R2021b
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)