Package com.evopdf
Class PdfHeaderOptions
java.lang.Object
com.evopdf.PdfHeaderOptions
This class encapsulates the options to control the appearance of the header
in the rendered PDF document. The HtmlToPdfConverter class exposes a
reference to an object of this type in
HtmlToPdfConverter.pdfHeaderOptions()
property. If the
PdfDocumentOptions.showHeader()
property of the
PdfDocumentOptions
object exposed by the
HtmlToPdfConverter.pdfDocumentOptions()
property is false, the header
options have no effect-
Method Summary
Modifier and TypeMethodDescriptionvoid
addElement
(PageElement pdfElement) Add a PDF element to be rendered in header by the HTML to PDF converterGets the background color of the headerfloat
Gets the height in points of the header.int
Gets the increment for the total number of pages displayed using &P; variable in aTextElement
orHtmlToPdfVariableElement
added to the headerint
Gets the start index for page numbering using the &p; variable in aTextElement
orHtmlToPdfVariableElement
added to the headervoid
setHeaderBackColor
(RgbColor headerBackColor) Sets the background color of the headervoid
setHeaderHeight
(float headerHeight) Sets the height in points of the header.void
setPageNumberingPageCountIncrement
(int pageNumberingPageCountIncrement) Sets the increment for the total number of pages displayed using &P; variable in aTextElement
orHtmlToPdfVariableElement
added to the headervoid
setPageNumberingStartIndex
(int pageNumberingStartIndex) Sets the start index for page numbering using the &p; variable in aTextElement
orHtmlToPdfVariableElement
added to the headervoid
setShowInEvenPages
(boolean showInEvenPages) Sets the flag indicating if the header is displayed in the even pages of the PDF documentvoid
setShowInFirstPage
(boolean showInFirstPage) Sets the flag indicating if the header is displayed in the first page of the PDF documentvoid
setShowInOddPages
(boolean showInOddPages) Sets the flag indicating if the header is displayed in the odd pages of the PDF documentboolean
Gets the flag indicating if the header is displayed in the even pages of the PDF documentboolean
Gets the flag indicating if the header is displayed in the first page of the PDF documentboolean
Gets the flag indicating if the header is displayed in the odd pages of the PDF document
-
Method Details
-
headerBackColor
Gets the background color of the header- Returns:
- the background color of the header
-
setHeaderBackColor
Sets the background color of the header- Parameters:
headerBackColor
- the background color of the header
-
headerHeight
public float headerHeight()Gets the height in points of the header. 1 point is 1/72 inch- Returns:
- the height in points of the header
-
setHeaderHeight
public void setHeaderHeight(float headerHeight) Sets the height in points of the header. 1 point is 1/72 inch- Parameters:
headerHeight
- the height in points of the header
-
showInFirstPage
public boolean showInFirstPage()Gets the flag indicating if the header is displayed in the first page of the PDF document- Returns:
- the flag value
-
setShowInFirstPage
public void setShowInFirstPage(boolean showInFirstPage) Sets the flag indicating if the header is displayed in the first page of the PDF document- Parameters:
showInFirstPage
- the flag value to set
-
showInOddPages
public boolean showInOddPages()Gets the flag indicating if the header is displayed in the odd pages of the PDF document- Returns:
- the flag value
-
setShowInOddPages
public void setShowInOddPages(boolean showInOddPages) Sets the flag indicating if the header is displayed in the odd pages of the PDF document- Parameters:
showInOddPages
- the flag value to set
-
showInEvenPages
public boolean showInEvenPages()Gets the flag indicating if the header is displayed in the even pages of the PDF document- Returns:
- the flag value
-
setShowInEvenPages
public void setShowInEvenPages(boolean showInEvenPages) Sets the flag indicating if the header is displayed in the even pages of the PDF document- Parameters:
showInEvenPages
- the flag value to set
-
pageNumberingStartIndex
public int pageNumberingStartIndex()Gets the start index for page numbering using the &p; variable in aTextElement
orHtmlToPdfVariableElement
added to the header- Returns:
- the current start index
-
setPageNumberingStartIndex
public void setPageNumberingStartIndex(int pageNumberingStartIndex) Sets the start index for page numbering using the &p; variable in aTextElement
orHtmlToPdfVariableElement
added to the header- Parameters:
pageNumberingStartIndex
- the start index to set
-
pageNumberingPageCountIncrement
public int pageNumberingPageCountIncrement()Gets the increment for the total number of pages displayed using &P; variable in aTextElement
orHtmlToPdfVariableElement
added to the header- Returns:
- the current increment
-
setPageNumberingPageCountIncrement
public void setPageNumberingPageCountIncrement(int pageNumberingPageCountIncrement) Sets the increment for the total number of pages displayed using &P; variable in aTextElement
orHtmlToPdfVariableElement
added to the header- Parameters:
pageNumberingPageCountIncrement
- the increment to set
-
addElement
Add a PDF element to be rendered in header by the HTML to PDF converter- Parameters:
pdfElement
- the PDF element to be rendered in header
-