Home  Products  Purchase  Downloads  Demos  Forums  Blogs  Ticket  Wiki  API  Corporate

com.aspose.pdf.elements
Class PageSetup

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

public class PageSetup
extends PdfElementBase

Encapsulates info for page setup.


Constructor Summary
PageSetup(ElementFactory elementFactory)
          Initializes a new instance of the PageSetup class.
 
Method Summary
 java.lang.Object clone()
          Gets a clone of PageSetup.
 org.w3c.dom.Element getDOMElement()
          Gets a DOM representation of the pdf element.
 MarginInfo getMargin()
          Gets a MarginInfo object that indicates the page margin info
 float getPageHeight()
          Gets the height of page.
 java.lang.String getPageSetupName()
          Gets the name of the PageSetup object.
 float getPageWidth()
          Gets the width of page.
 void setMargin(MarginInfo margin)
          sets a MarginInfo object that indicates the page margin info
 void setPageHeight(float pageHeight)
          Sets the height of page, unit is pt.
 void setPageWidth(float pageWidth)
          Sets the width of page, unit is pt.
 
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

PageSetup

public PageSetup(ElementFactory elementFactory)
          throws AsposeBaseException
Initializes a new instance of the PageSetup class.

Parameters:
elementFactory - xsl-fo DOM element factory.
Throws:
AsposeBaseException - throws when elementFactory gets an error.
Method Detail

clone

public java.lang.Object clone()
                       throws java.lang.CloneNotSupportedException
Gets a clone of PageSetup. You could get an object of PageSetup by Pdf.getPageSetup().clone()

Overrides:
clone in class PdfElementBase
Throws:
java.lang.CloneNotSupportedException - throw when Cloneable interface not implemented
AsposeBaseException
See Also:
java.lang.Object#clone(),Pdf.getPageSetup()

getPageSetupName

public java.lang.String getPageSetupName()
Gets the name of the PageSetup object.

Returns:
the name of the PageSetup object.

setPageHeight

public void setPageHeight(float pageHeight)
Sets the height of page, unit is pt.

Parameters:
pageHeight - float, page height in pt

getPageHeight

public float getPageHeight()
Gets the height of page.

Returns:
page height

setPageWidth

public void setPageWidth(float pageWidth)
Sets the width of page, unit is pt.

Parameters:
pageWidth - float, page width in pt

getPageWidth

public float getPageWidth()
Gets the width of page.

Returns:
page width

setMargin

public void setMargin(MarginInfo margin)
sets a MarginInfo object that indicates the page margin info

Parameters:
margin - MarginInfo

getMargin

public MarginInfo getMargin()
Gets a MarginInfo object that indicates the page margin info

Returns:
MarginInfo object

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()