Class TextHeaderFooter
- All Implemented Interfaces:
- Cloneable
TextHeaderFooter uses a fast and logical approach to rendering Headers and Footers for the most
 common use cases. A more advanced option available to developers is HtmlHeaderFooter.
See:PdfDocument.addTextHeader(TextHeaderFooter) & PdfDocument.addTextFooter(TextHeaderFooter)  
- 
Constructor SummaryConstructorsConstructorDescriptionCreates a text based PDF Header and Footer.TextHeaderFooter(String leftText, String centerText, String rightText) Creates a text based PDF Header and Footer.
- 
Method SummaryModifier and TypeMethodDescriptionClone()Clones this instance.Gets center text.getFont()Gets font.doubleGets font size.Gets left text.Gets right text.doubleGets spacing.booleanIs draw divider line boolean.voidsetCenterText(String value) Sets center text.voidsetDrawDividerLine(boolean value) Sets draw divider line.voidSets font.voidsetFontSize(double value) Sets font size.voidsetLeftText(String value) Sets left text.voidsetRightText(String value) Sets right text.voidsetSpacing(double value) Sets spacing.
- 
Constructor Details- 
TextHeaderFooterpublic TextHeaderFooter()Creates a text based PDF Header and Footer. Please set any ofsetLeftText(String),setCenterText(String)orsetRightText(String)
- 
TextHeaderFooterCreates a text based PDF Header and Footer.- Parameters:
- leftText- the left text. Default is null.
- centerText- the center text. Default is null.
- rightText- the right text. Default is null.
 
 
- 
- 
Method Details- 
getCenterTextGets center text. The centered header text for the PDF document.Merge meta-data into your header using any of these placeholder strings: {page} {total-pages} {url} {date} {time} {html-title} {pdf-title} - Returns:
- the center text
 
- 
setCenterTextSets center text. The centered header text for the PDF document.Merge meta-data into your header using any of these placeholder strings: {page} {total-pages} {url} {date} {time} {html-title} {pdf-title} - Parameters:
- value- the value
 
- 
isDrawDividerLinepublic boolean isDrawDividerLine()Is draw divider line boolean. A horizontal line divider between the header / footer and the page content on every page of the PDF document.- Returns:
- the boolean
 
- 
setDrawDividerLinepublic void setDrawDividerLine(boolean value) Sets draw divider line. A horizontal line divider between the header / footer and the page content on every page of the PDF document.- Parameters:
- value- the value
 
- 
getFontGets font.- Returns:
- the font
 
- 
setFontSets font.- Parameters:
- value- the value
 
- 
getFontSizepublic double getFontSize()Gets font size.- Returns:
- the font size
 
- 
setFontSizepublic void setFontSize(double value) Sets font size.- Parameters:
- value- the value
 
- 
getLeftTextGets left text. The left hand side header text for the PDF document.Merge meta-data into your header using any of these placeholder strings: {page} {total-pages} {url} {date} {time} {html-title} {pdf-title} - Returns:
- the left text
 
- 
setLeftTextSets left text. The left hand side header text for the PDF document.Merge meta-data into your header using any of these placeholder strings: {page} {total-pages} {url} {date} {time} {html-title} {pdf-title} - Parameters:
- value- the value
 
- 
getRightTextGets right text. The right hand side header text for the PDF document.Merge meta-data into your header using any of these placeholder strings: {page} {total-pages} {url} {date} {time} {html-title} {pdf-title} - Returns:
- the right text
 
- 
setRightTextSets right text. The right hand side header text for the PDF document.Merge meta-data into your header using any of these placeholder strings: {page} {total-pages} {url} {date} {time} {html-title} {pdf-title} - Parameters:
- value- the value
 
- 
getSpacingpublic double getSpacing()Gets spacing.- Returns:
- the spacing
 
- 
setSpacingpublic void setSpacing(double value) Sets spacing.- Parameters:
- value- the value
 
- 
CloneClones this instance.- Returns:
- System.Object of type SimpleHeaderFooter
- Throws:
- CloneNotSupportedException- the clone not supported exception
 
 
-