com.aspose.pdf.elements
Class ElementFactory

java.lang.Object
  extended by com.aspose.pdf.elements.ElementFactory

public class ElementFactory
extends java.lang.Object

Encapsulats a factory that make DOM elements. Users need not pay much attention to this class.


Constructor Summary
ElementFactory(org.w3c.dom.Document doc)
          Initializes an object of class ElementFactory.
 
Method Summary
 org.w3c.dom.Attr createAttribute(java.lang.String name)
          Create an attribute node in DOM.
 org.w3c.dom.Element createElement(java.lang.String tagName)
          Creates an DOM Element.
 org.w3c.dom.Attr createMarginBottom(java.lang.String value)
          Create margion-bottom attribute in fo.
 org.w3c.dom.Attr createMarginLeft(java.lang.String value)
          Create margion-left attribute in fo.
 org.w3c.dom.Attr createMarginRight(java.lang.String value)
          Create margion-right attribute in fo.
 org.w3c.dom.Attr createMarginTop(java.lang.String value)
          Create margion-top attribute in fo.
 org.w3c.dom.Attr createMasterName(java.lang.String value)
          Create master name in simple-page-master.
 org.w3c.dom.Attr createNameSpace()
          Create xml namespace.
 org.w3c.dom.Attr createPageHeight(java.lang.String value)
          Create page-height attribute.
 org.w3c.dom.Attr createPageWidth(java.lang.String value)
          Create page-width attribute.
 org.w3c.dom.Attr createProperty(java.lang.String name, java.lang.String value, java.lang.String default_value)
          Create property node with name and value.
 org.w3c.dom.Attr createReferenceOrientation(java.lang.String value)
          Create reference orientation attribute.
 org.w3c.dom.Element createSimplePageMaster()
          Create fo simple-page-master element.
 org.w3c.dom.Text createTextNode(java.lang.String data)
          Create text node in DOM.
 org.w3c.dom.Attr createWritingMode(java.lang.String value)
          Create Writing mode attribute.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ElementFactory

public ElementFactory(org.w3c.dom.Document doc)
               throws javax.xml.parsers.ParserConfigurationException
Initializes an object of class ElementFactory.

Parameters:
doc - , the pdf doccument created.
Throws:
javax.xml.parsers.ParserConfigurationException
Method Detail

createElement

public org.w3c.dom.Element createElement(java.lang.String tagName)
                                  throws AsposeBaseException
Creates an DOM Element.

Parameters:
tagName - The tag name of Element.
Returns:
Element.
Throws:
AsposeBaseException

createAttribute

public org.w3c.dom.Attr createAttribute(java.lang.String name)
                                 throws AsposeBaseException
Create an attribute node in DOM.

Parameters:
name - The attribute name.
Returns:
The new Attribute Node.
Throws:
AsposeBaseException

createNameSpace

public org.w3c.dom.Attr createNameSpace()
                                 throws AsposeBaseException
Create xml namespace.

Throws:
AsposeBaseException

createProperty

public org.w3c.dom.Attr createProperty(java.lang.String name,
                                       java.lang.String value,
                                       java.lang.String default_value)
                                throws AsposeBaseException
Create property node with name and value.

Parameters:
name - The property name.
value - The property name.
default_value - If value not specified , then use this value.
Returns:
The attribute Node.
Throws:
AsposeBaseException

createSimplePageMaster

public org.w3c.dom.Element createSimplePageMaster()
                                           throws AsposeBaseException
Create fo simple-page-master element.

Throws:
AsposeBaseException

createMasterName

public org.w3c.dom.Attr createMasterName(java.lang.String value)
                                  throws AsposeBaseException
Create master name in simple-page-master.

Throws:
AsposeBaseException

createMarginTop

public org.w3c.dom.Attr createMarginTop(java.lang.String value)
                                 throws AsposeBaseException
Create margion-top attribute in fo.

Throws:
AsposeBaseException

createMarginBottom

public org.w3c.dom.Attr createMarginBottom(java.lang.String value)
                                    throws AsposeBaseException
Create margion-bottom attribute in fo.

Throws:
AsposeBaseException

createMarginLeft

public org.w3c.dom.Attr createMarginLeft(java.lang.String value)
                                  throws AsposeBaseException
Create margion-left attribute in fo.

Throws:
AsposeBaseException

createMarginRight

public org.w3c.dom.Attr createMarginRight(java.lang.String value)
                                   throws AsposeBaseException
Create margion-right attribute in fo.

Throws:
AsposeBaseException

createPageHeight

public org.w3c.dom.Attr createPageHeight(java.lang.String value)
                                  throws AsposeBaseException
Create page-height attribute.

Throws:
AsposeBaseException

createPageWidth

public org.w3c.dom.Attr createPageWidth(java.lang.String value)
                                 throws AsposeBaseException
Create page-width attribute.

Throws:
AsposeBaseException

createReferenceOrientation

public org.w3c.dom.Attr createReferenceOrientation(java.lang.String value)
                                            throws AsposeBaseException
Create reference orientation attribute.

Throws:
AsposeBaseException

createWritingMode

public org.w3c.dom.Attr createWritingMode(java.lang.String value)
                                   throws AsposeBaseException
Create Writing mode attribute.

Throws:
AsposeBaseException

createTextNode

public org.w3c.dom.Text createTextNode(java.lang.String data)
                                throws AsposeBaseException
Create text node in DOM.

Throws:
AsposeBaseException