com.aspose.pdf.elements
Class HeaderFooter

java.lang.Object
  extended bycom.aspose.pdf.elements.HeaderFooter

public class HeaderFooter
extends java.lang.Object

Represents a header or footer of a page in a Pdf document.


Constructor Summary
HeaderFooter()
          Initialize a new instance of the IT_HeaderFooter class.
HeaderFooter(Section section)
          Initialize a new instance of the IT_HeaderFooter class.
 
Method Summary
 java.lang.Object clone()
           
 GraphInfo getGraphInfo()
          Gets a GraphInfo that indicates graph info of the section.
 MarginInfo getMarginInfo()
          Gets a MarginInfo object that indicates the margin info of the header or footer.
 Paragraphs getParagraphs()
          Gets a Paragraphs collection that indicates all paragraphs in the header or footer.
 TextInfo getTextInfo()
          Gets a TextInfo object that indicates the text info of the header or footer.
 boolean isFirstPageOnly()
          Gets a bool value that indicates whether the header or footer be printed
on first page only.
 boolean isLastPageOnly()
          Gets a bool value that indicates whether the header or footer be printed on last page only.
 boolean isSubsequentPagesOnly()
          Gets a bool value that indicates whether the header or footer be printed not on first page
but on subsequent pages only.
 void setGraphInfo(GraphInfo graphInfo)
          Sets a GraphInfo that indicates graph info of the section.
 void setIsFirstPageOnly(boolean firstPageOnly)
          Sets a bool value that indicates whether the header or footer be printed
on first page only.
 void setIsLastPageOnly(boolean lastPageOnly)
          Sets a bool value that indicates whether the header or footer be printed on last page only.
 void setIsSubsequentPagesOnly(boolean subsequentPagesOnly)
          Sets a bool value that indicates whether the header or footer be printed not on first page
but on subsequent pages only.
 void setMarginInfo(MarginInfo marginInfo)
          Sets a MarginInfo object that indicates the margin info of the header or footer.
 void setParagraphs(Paragraphs paragraphs)
          Sets a Paragraphs collection that indicates all paragraphs in the header or footer.
 void setTextInfo(TextInfo textInfo)
          Sets a TextInfo object that indicates the text info of the header or footer.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HeaderFooter

public HeaderFooter(Section section)
Initialize a new instance of the IT_HeaderFooter class.

 [SampleCode]
 Pdf pdf = new Pdf();
 Section sec1 = pdf.getSections().add();
 Text text1 = new Text(sec1,"This example domestrates how to use pdf header and footer.");
 sec1.getParagraphs().add(text1);
 IT_HeaderFooter head = new IT_HeaderFooter(sec1);
 Text headText = new Text(sec1,"Aspose IT_HeaderFooter");
 head.setHerderHeight(30);
 head.setHeaderText(headText);
 sec1.setHeader(head);
 

Parameters:
section - The Section that owns the header.

HeaderFooter

public HeaderFooter()
Initialize a new instance of the IT_HeaderFooter class.

Method Detail

clone

public java.lang.Object clone()
                       throws java.lang.CloneNotSupportedException
Throws:
java.lang.CloneNotSupportedException
See Also:
java.lang.Object#clone()

getGraphInfo

public GraphInfo getGraphInfo()
Gets a GraphInfo that indicates graph info of the section.

Returns:
Returns the GraphInfo.

setGraphInfo

public void setGraphInfo(GraphInfo graphInfo)
Sets a GraphInfo that indicates graph info of the section.


isFirstPageOnly

public boolean isFirstPageOnly()
Gets a bool value that indicates whether the header or footer be printed
on first page only. The default value is false.If this property is set to true,
the IsSubsequentPagesOnly should be false.

Returns:
Returns the IsFirstPageOnly.

setIsFirstPageOnly

public void setIsFirstPageOnly(boolean firstPageOnly)
Sets a bool value that indicates whether the header or footer be printed
on first page only. The default value is false.If this property is set to true,
the IsSubsequentPagesOnly should be false.

Parameters:
firstPageOnly - The IsFirstPageOnly to set.

isLastPageOnly

public boolean isLastPageOnly()
Gets a bool value that indicates whether the header or footer be printed on last page only.
The default value is false.

Returns:
Returns the IsLastPageOnly.

setIsLastPageOnly

public void setIsLastPageOnly(boolean lastPageOnly)
Sets a bool value that indicates whether the header or footer be printed on last page only.
The default value is false.

Parameters:
lastPageOnly - The IsLastPageOnly to set.

isSubsequentPagesOnly

public boolean isSubsequentPagesOnly()
Gets a bool value that indicates whether the header or footer be printed not on first page
but on subsequent pages only. The default value is false. If this property is set to true,
the IsFirstPageOnly should be false.

Returns:
Returns the IsSubsequentPagesOnly.

setIsSubsequentPagesOnly

public void setIsSubsequentPagesOnly(boolean subsequentPagesOnly)
Sets a bool value that indicates whether the header or footer be printed not on first page
but on subsequent pages only. The default value is false. If this property is set to true,
the IsFirstPageOnly should be false.

Parameters:
subsequentPagesOnly - The IsSubsequentPagesOnly to set.

getMarginInfo

public MarginInfo getMarginInfo()
Gets a MarginInfo object that indicates the margin info of the header or footer.

Returns:
Returns the MarginInfo.

setMarginInfo

public void setMarginInfo(MarginInfo marginInfo)
Sets a MarginInfo object that indicates the margin info of the header or footer.


getParagraphs

public Paragraphs getParagraphs()
Gets a Paragraphs collection that indicates all paragraphs in the header or footer.

Returns:
Returns the paragraphs.

setParagraphs

public void setParagraphs(Paragraphs paragraphs)
Sets a Paragraphs collection that indicates all paragraphs in the header or footer.


getTextInfo

public TextInfo getTextInfo()
Gets a TextInfo object that indicates the text info of the header or footer.

Returns:
Returns the TextInfo.

setTextInfo

public void setTextInfo(TextInfo textInfo)
Sets a TextInfo object that indicates the text info of the header or footer.