Main Content

mlreportgen.dom.PDFPageHeader Class

Namespace: mlreportgen.dom

Page header definition for PDF document

Description

Add a header to the first page of a section or to odd pages, even pages, or both.

The mlreportgen.dom.PDFPageHeader class is a handle class.

Creation

Description

pdfHeader = PDFPageHeader creates an empty page header based on the default PDF template.

pdfHeaderer = PDFPageHeader(pageType) creates a page header for the specified type of page, that is, odd, even, or first, based on the default PDF template.

PageHeader = PDFPageHeader(pageType,templatePath) creates a page header for the specified type of page based on the specified template.

pdfHeader = PDFPageHeader(pageType,templatePath,docPartTemplateName) creates a page header for the specified type of page, based on the specified document part template in the specified template.

pdfHeader = PDFPageHeader(pageType,templateSrc,docPartTemplateName) creates a page header for the specified type of page, based on the specified document part template used by the specified source. The source can be a document or a document part.

Input Arguments

expand all

Type of page header appears on, specified as one of these values:

  • default — Header for odd pages of the section, even pages if you do not specify an even-page header, and first page if you do not specify a first-page header.

  • first — Header for first page of a section.

  • even — Header for even pages in a section.

For example, to have a blank header appear on the first page of a section and a different header appear on the other pages, define two headers, one with pageType set to first and the other with pageType set to default.

Full path of header template, specified as a string scalar or a character vector.

Data Types: char | string

Name of this part’s template if it is stored in a template specified by the templatePath or templateSrc argument, specified as a character vector or string scalar.

Document or document part object whose template contains the template for this document part, specified as an mlreportgen.dom.Document object for a document or an mlreportgen.dom.DocumentPart object for a document part.

Properties

expand all

ID of the current hole in the document, specified as a character vector or string scalar.

Attributes:

SetAccess
private
Transient
true
NonCopyable
true

Data Types: char | string

Type of the current template hole, specified as "Inline" or "Block".

  • An inline hole is for document elements that a paragraph element can contain: Text, Image, LinkTarget, ExternalLink, InternalLink, CharEntity, or AutoNumber.

  • A block hole can contain a Paragraph, Table, OrderedList, UnorderedList, DocumentPart, or Group element.

Attributes:

SetAccess
private
Transient
true
NonCopyable
true

Data Types: char | string

Current page layout of this document, specified as an mlreportgen.dom.DOCXPageLayout object, mlreportgen.dom.PDFPageLayout object, or []. This property applies to Word and PDF documents. For Word documents, the value is a DOCXPageLayout object that specifies the current page layout. For PDF documents, the value is a PDFPageLayout object if the document currently specifies a page layout. For HTML documents, the value is always [].

Attributes:

SetAccess
private
Transient
true
NonCopyable
true

Type of page header appears on, specified as one of these values:

  • default — Header for odd pages of the section, even pages if you do not specify an even-page header, and first page if you do not specify a first-page header.

  • first — Header for first page of a section.

  • even — Header for even pages in a section.

For example, to have a blank header appear on the first page and a different header appear on the other pages, define two headers, one with pageType set to first and the other with pageType set to default.

Full path of header template, specified as a string scalar or a character vector.

Data Types: char | string

Parent of mlreportgen.dom.PDFPageHeader object, specified as a document element object. A document element must have only one parent.

Attributes:

SetAccess
private
NonCopyable
true

Children of mlreportgen.dom.PDFPageHeader object, specified as an array of document element objects. This property contains the document element objects appended using the append method.

Attributes:

SetAccess
private
NonCopyable
true

Tag for the mlreportgen.dom.PDFPageHeader 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

Object identifier for the mlreportgen.dom.PDFPageHeader 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

Methods

expand all

Version History

Introduced in R2016a