Class TextHeaderFooter
- java.lang.Object
-
- com.ironsoftware.ironpdf.headerfooter.TextHeaderFooter
-
- All Implemented Interfaces:
Cloneable
public class TextHeaderFooter extends Object implements Cloneable
Defines a text based PDF Header and Footer.TextHeaderFooteruses a fast and logical approach to rendering Headers and Footers for the most common use cases. A more advanced option available to developers isHtmlHeaderFooter.See:
PdfDocument.addTextHeader(TextHeaderFooter)&PdfDocument.addTextFooter(TextHeaderFooter)
-
-
Constructor Summary
Constructors Constructor Description TextHeaderFooter()Creates a text based PDF Header and Footer.TextHeaderFooter(String leftText, String centerText, String rightText)Creates a text based PDF Header and Footer.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ObjectClone()Clones this instance.StringgetCenterText()Gets center text.StringgetDividerLineColor()Gets divider line color code.FontTypesgetFont()Gets font.doublegetFontSize()Gets font size.StringgetLeftText()Gets left text.StringgetRightText()Gets right text.doublegetSpacing()Gets spacing.booleanisDrawDividerLine()Is draw divider line boolean.voidsetCenterText(String value)Sets center text.voidsetDividerLineColor(String colorCode)Sets divider line color.voidsetDrawDividerLine(boolean value)Sets draw divider line.voidsetFont(FontTypes value)Sets 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 Detail
-
TextHeaderFooter
public TextHeaderFooter()
Creates a text based PDF Header and Footer. Please set any ofsetLeftText(String),setCenterText(String)orsetRightText(String)
-
-
Method Detail
-
getCenterText
public String getCenterText()
Gets 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
-
setCenterText
public void setCenterText(String value)
Sets 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
-
isDrawDividerLine
public 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
-
setDrawDividerLine
public 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
-
getDividerLineColor
public String getDividerLineColor()
Gets divider line color code.- Returns:
- the color code
-
setDividerLineColor
public void setDividerLineColor(String colorCode)
Sets divider line color.- Parameters:
colorCode- color code
-
getFont
public FontTypes getFont()
Gets font.- Returns:
- the font
-
setFont
public void setFont(FontTypes value)
Sets font.- Parameters:
value- the value
-
getFontSize
public double getFontSize()
Gets font size.- Returns:
- the font size
-
setFontSize
public void setFontSize(double value)
Sets font size.- Parameters:
value- the value
-
getLeftText
public String getLeftText()
Gets 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
-
setLeftText
public void setLeftText(String value)
Sets 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
-
getRightText
public String getRightText()
Gets 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
-
setRightText
public void setRightText(String value)
Sets 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
-
getSpacing
public double getSpacing()
Gets spacing.- Returns:
- the spacing
-
setSpacing
public void setSpacing(double value)
Sets spacing.- Parameters:
value- the value
-
Clone
public Object Clone() throws CloneNotSupportedException
Clones this instance.- Returns:
- System.Object of type SimpleHeaderFooter
- Throws:
CloneNotSupportedException- the clone not supported exception
-
-