mlreportgen.dom.DOCXPageMargins Class
Namespace: mlreportgen.dom
Superclasses: mlreportgen.dom.PageMargins
(To be removed) 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.
This class is only compatible with this MATLAB®
Report Generator™ output type: "docx".
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
Page margins, represented by an DOCXPageMargins
object.
Properties
Header size, specified as a character vector or string scalar that contains
a number followed by an abbreviation for a unit of measurement. For example, "1in" specifies 1 inch. Valid abbreviations are:
"px"— Pixels"cm"— Centimeters"in"— Inches"mm"— Millimeters"pc"— Picas"pt"— Points
You can also specify pixels by omitting the unit. For example, "5"
specifies 5 pixels.
Attributes:
GetAccesspublicSetAccesspublicNonCopyabletrue
Data Types: char | string
Footer size, specified as a character vector or string scalar that contains
a number followed by an abbreviation for a unit of measurement. For example, "1in" specifies 1 inch. Valid abbreviations are:
"px"— Pixels"cm"— Centimeters"in"— Inches"mm"— Millimeters"pc"— Picas"pt"— Points
You can also specify pixels by omitting the unit. For example, "5"
specifies 5 pixels.
Attributes:
GetAccesspublicSetAccesspublicNonCopyabletrue
Data Types: char | string
Gutter size, specified as a character vector or string scalar that contains
a number followed by an abbreviation for a unit of measurement. For example, "1in" specifies 1 inch. Valid abbreviations are:
"px"— Pixels"cm"— Centimeters"in"— Inches"mm"— Millimeters"pc"— Picas"pt"— Points
You can also specify pixels by omitting the unit. For example, "5"
specifies 5 pixels.
Attributes:
GetAccesspublicSetAccesspublicNonCopyabletrue
Data Types: char | string
Left margin size, specified as a character vector or string scalar that contains
a number followed by an abbreviation for a unit of measurement. For example, "1in" specifies 1 inch. Valid abbreviations are:
"px"— Pixels"cm"— Centimeters"in"— Inches"mm"— Millimeters"pc"— Picas"pt"— Points
You can also specify pixels by omitting the unit. For example, "5"
specifies 5 pixels.
Attributes:
GetAccesspublicSetAccesspublicNonCopyabletrue
Data Types: char | string
Right margin size, specified as a character vector or string scalar that contains
a number followed by an abbreviation for a unit of measurement. For example, "1in" specifies 1 inch. Valid abbreviations are:
"px"— Pixels"cm"— Centimeters"in"— Inches"mm"— Millimeters"pc"— Picas"pt"— Points
You can also specify pixels by omitting the unit. For example, "5"
specifies 5 pixels.
Attributes:
GetAccesspublicSetAccesspublicNonCopyabletrue
Data Types: char | string
Top margin size, specified as a character vector or string scalar that contains
a number followed by an abbreviation for a unit of measurement. For example, "1in" specifies 1 inch. Valid abbreviations are:
"px"— Pixels"cm"— Centimeters"in"— Inches"mm"— Millimeters"pc"— Picas"pt"— Points
You can also specify pixels by omitting the unit. For example, "5"
specifies 5 pixels.
Attributes:
GetAccesspublicSetAccesspublicNonCopyabletrue
Data Types: char | string
Bottom margin size, specified as a character vector or string scalar that contains
a number followed by an abbreviation for a unit of measurement. For example, "1in" specifies 1 inch. Valid abbreviations are:
"px"— Pixels"cm"— Centimeters"in"— Inches"mm"— Millimeters"pc"— Picas"pt"— Points
You can also specify pixels by omitting the unit. For example, "5"
specifies 5 pixels.
Attributes:
GetAccesspublicSetAccesspublicNonCopyabletrue
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:
GetAccesspublicSetAccesspublicNonCopyabletrue
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:
GetAccesspublicSetAccesspublicNonCopyabletrue
Data Types: char | string
Examples
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.
Sélectionner un site web
Choisissez un site web pour accéder au contenu traduit dans votre langue (lorsqu'il est disponible) et voir les événements et les offres locales. D’après votre position, nous vous recommandons de sélectionner la région suivante : .
Vous pouvez également sélectionner un site web dans la liste suivante :
Comment optimiser les performances du site
Pour optimiser les performances du site, sélectionnez la région Chine (en chinois ou en anglais). Les sites de MathWorks pour les autres pays ne sont pas optimisés pour les visites provenant de votre région.
Amériques
- 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)