mlreportgen.dom.DOCXPageMargins Class
Namespace: mlreportgen.dom
Superclasses:
Page margins for Microsoft Word page layout
Compatibility
Note
mlreportgen.dom.DOCXPageMargins
will be removed in a future
release. Use mlreportgen.dom.PageMargins
instead.
Description
Specifies the size of the page margins of a section of a Microsoft® Word document.
Construction
specifies default page margins, which are one inch for the top, bottom, left, and right
margins, and one-half inch for the gutter, header, and footer margins.docxPageMarginsObj
= DOCXPageMargins
Output Arguments
docxPageMarginsObj
— Page margins
DOCXPageMargins
object
Page margins, represented by an DOCXPageMargins
object.
Properties
Bottom
— Bottom margin size
character vector
character vector specifying the width of the bottom margin. The character
vector must have the format valueUnits
where
Units
is an abbreviation for the units in which the
width size is expressed. Valid abbreviations are:
no abbreviation — pixels
px
— pixelscm
— centimetersin
— inchesmm
— millimeterspc
— picaspt
— points
Footer
— Footer size
character vector
Specify the size using the same format used for the
Bottom
property.
Gutter
— Gutter size
character vector
Specify the size using the same format used for the
Bottom
property.
Header
— Header size
character vector
Specify the size using the same format used for the
Bottom
property.
Id
— Object identifier for mlreportgen.dom.DOCXPageMargins
object
character vector | string scalar
Object identifier for the mlreportgen.dom.DOCXPageMargins
object, specified as a
character vector or string scalar. The DOM API generates a session-unique identifier
when it creates the document element object. You can specify your own value for
Id
.
Attributes:
NonCopyable
true
Data Types: char
| string
Left
— Left margin size
character vector
Specify the size using the same format used for the
Bottom
property.
Right
— Right margin size
character vector
Specify the size using the same format used for the
Bottom
property.
Tag
— Tag for mlreportgen.dom.DOCXPageMargins
object
character vector | string scalar
Tag for the mlreportgen.dom.DOCXPageMargins
object, 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. Specify your own tag value to help
you identify where to look when an issue occurs during document generation.
Attributes:
NonCopyable
true
Data Types: char
| string
Top
— Top margin size
character vector
Specify the size using the same format used for the
Bottom
property.
Examples
Reset Default Margins
Reset the margins specified by the default DOM template.
import mlreportgen.dom.*; d = Document('myreport','docx'); open(d); s = d.CurrentPageLayout; s.PageMargins.Left = '.5in'; s.PageMargins.Right = '.5in'; append(d,'Left and right margins are .5 inch'); close(d); rptview('myreport','docx');
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)
Asia Pacific
- Australia (English)
- India (English)
- New Zealand (English)
- 中国
- 日本Japanese (日本語)
- 한국Korean (한국어)