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.
Seleccione un país/idioma
Seleccione un país/idioma para obtener contenido traducido, si está disponible, y ver eventos y ofertas de productos y servicios locales. Según su ubicación geográfica, recomendamos que seleccione: .
También puede seleccionar uno de estos países/idiomas:
Cómo obtener el mejor rendimiento
Seleccione China (en idioma chino o inglés) para obtener el mejor rendimiento. Los sitios web de otros países no están optimizados para ser accedidos desde su ubicación geográfica.
América
- América Latina (Español)
- Canada (English)
- United States (English)
Europa
- 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)