Documentation

This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

mlreportgen.dom.PDFPageHeader class

Package: mlreportgen.dom
Superclasses:

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.

Construction

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 footer template, specified as a character vector.

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.

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 a mlreportgen.dom.DocumentPart object for a document part.

Output Arguments

expand all

Page header for a PDF document, returned as an mlreportgen.dom.PDFPageHeader object.

Properties

expand all

This read-only property lists child elements of this object.

This read-only property is the hole ID of the current hole in this document.

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, AutoNumber.

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

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 [].

ID for this document element, specified as a character vector. The DOM generates a session-unique ID when it creates the document element. You can specify your own ID.

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.

This read-only property lists the parent of this document element.

Tag for document element, specified as a character vector.

A session-unique ID is generated as part of document element creation. The generated tag has the form CLASS:ID, where CLASS is the class of the element and ID is the value of the Id property of the object. You can specify a tag to replace the generated tag.

For example, to make it easier to identify where an issue occurred during document generation, you can specify your own tag value.

Full path to template to use for this header, specified as a character vector.

Methods

Use PDFPageHeader methods as you use the corresponding Document methods.

Method

Purpose

append

Append one of these DOM objects to the header:

  • CustomElement

  • PDFPageLayout

  • FormalTable

  • Group

  • ExternalLink

  • Image

  • InternalLink

  • OrderedList

  • Paragraph

  • RawText

  • Table

  • Text

  • UnorderedList

close

Close header.

fill

Fill template hole.

moveToNextHole

Move to next template hole.

open

Open header.

Introduced in R2016a

Was this topic helpful?