Home  Products  Purchase  Downloads  Demos  Forums  Blogs  Ticket  Wiki  API  Corporate

com.aspose.pdf.elements
Class Header

java.lang.Object
  extended bycom.aspose.pdf.elements.PdfElementBase
      extended bycom.aspose.pdf.elements.Header
All Implemented Interfaces:
java.lang.Cloneable

public class Header
extends PdfElementBase

Represents a header of a page in a Pdf document.


Constructor Summary
Header(Section section)
          Initialize a new instance of the Header class.
 
Method Summary
 java.lang.Object clone()
          Clone an object.
 org.w3c.dom.Element getDOMElement()
          Gets a DOM representation of the pdf element.
 float getHeaderHeight()
          Gets a float value that indicates the height of header.
 java.lang.String getHeaderName()
          Gets the Name of Header.
 Text getHeaderText()
          Gets a Text that indicates the content in the header.
 void setHeaderText(Text content)
          Sets a Text that indicates the content in the header.
 void setHerderHeight(float height)
          Gets a float value that indicates the height of header.
 
Methods inherited from class com.aspose.pdf.elements.PdfElementBase
getElementFactory, getID, getNameIndex, setID
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Header

public Header(Section section)
Initialize a new instance of the Header 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);
 Header head = new Header(sec1);
 Text headText = new Text(sec1,"Aspose Header");
 head.setHerderHeight(30);
 head.setHeaderText(headText);
 sec1.setHeader(head);
 

Parameters:
section - The Section that owns the header.
Method Detail

clone

public java.lang.Object clone()
                       throws java.lang.CloneNotSupportedException
Description copied from class: PdfElementBase
Clone an object.

Overrides:
clone in class PdfElementBase
Throws:
java.lang.CloneNotSupportedException
See Also:
java.lang.Object#clone()

getDOMElement

public org.w3c.dom.Element getDOMElement()
                                  throws AsposeBaseException
Description copied from class: PdfElementBase
Gets a DOM representation of the pdf element.

Overrides:
getDOMElement in class PdfElementBase
Throws:
AsposeBaseException
See Also:
PdfElementBase.getDOMElement()

getHeaderHeight

public float getHeaderHeight()
Gets a float value that indicates the height of header.
The unit is point.


setHerderHeight

public void setHerderHeight(float height)
Gets a float value that indicates the height of header.
The default value is The unit is point.

Parameters:
height - The height to set.

getHeaderText

public Text getHeaderText()
Gets a Text that indicates the content in the header.


setHeaderText

public void setHeaderText(Text content)
Sets a Text that indicates the content in the header.

Throws:
java.lang.CloneNotSupportedException

getHeaderName

public java.lang.String getHeaderName()
Gets the Name of Header.