addHeader
- addBackgroundImage
- addFooter
- addHeader
- addLineNumbering
- addPageBorders
- addProperties
- addSection
- createDocx
- createCharacterStyle
- createListStyle
- createParagraphStyle
- createTableStyle
- docxSettings
- embedFont
- importHeadersAndFooters
- importStyles
- modifyPageLayout
- removeFooters
- removeHeaders
- setBackgroundColor
- setDefaultFont
- setDocumentDefaultStyles
- setEncodeUTF8
- setLanguage
- setMarkAsFinal
- setRTL
- addBibliography
- addBookmark
- addBreak
- addChart
- addCitation
- addComment
- addCrossReference
- addDateAndHour
- addEndnote
- addExternalFile
- addFootnote
- addFormElement
- addHeading
- addImage
- addLink
- addList
- addMathEquation
- addMergeField
- addOLE
- addPageNumber
- addShape
- addSimpleField
- addSource
- addStructuredDocumentTag
- addTable
- addTableContents
- addText
- addTextBox
- addWordML
- embedHTML
- clearBlocks
- deleteTemplateBlock
- getTemplateVariables
- getTemplateVariablesType
- modifyInputFields
- modifyMergeFields
- processTemplate
- removeTemplateVariable
- replaceListVariable
- replacePlaceholderImage
- replaceTableVariable
- replaceVariableByExternalFile
- replaceVariableByHtml
- replaceVariableByText
- replaceVariableByWordFragment
- replaceVariableByWordML
- setTemplateSymbol
- tickCheckbox
addHeader
BASIC / ADVANCED / PREMIUM
Inserts headers into the Word document.
Description
public void addHeader(HashMap<String, WordFragment> headers)
It is possible to include a different header for:
- the first page or title page.
- even pages.
- odd pages (this one is the default header for the whole document if no other headers are defined for the first or even pages).
The contents of the different headers are defined via the use of WordFragments. These header WordFragments allow for the insertion of:
- text paragraphs
- current date and/or hour
- images
- links
- lists
- page numbers
- shapes
- tables
Parameters
headers
A HashMap with the different header contents.
Option | Type | Description |
---|---|---|
default | WordFragment | The WordML fragment object containing the contents for the default (odd pages) header. |
even | WordFragment | The WordML fragment object containing the contents for the even pages header. |
first | WordFragment | The WordML fragment object containing the contents for the first (title) page header. |