protected class XmlToPdf.XmlPage
extends java.lang.Object
implements java.io.Serializable
Modifier and Type | Field and Description |
---|---|
protected com.itextpdf.text.pdf.PdfPTable |
__content |
protected org.w3c.dom.Node |
__node |
private static long |
serialVersionUID
The class' serialization version id.
|
Modifier | Constructor and Description |
---|---|
protected |
XmlPage(org.w3c.dom.Node node)
Constructs a new XML page node.
|
Modifier and Type | Method and Description |
---|---|
protected java.lang.String |
getAttr(java.lang.String name)
Returns an attribute value from the XML page node.
|
protected java.lang.String |
getChapter()
Returns the chapter name for the page.
|
protected boolean |
getReset()
Returns the reset page counter flag for the page.
|
protected java.lang.String |
getSection()
Returns the section name for the page.
|
protected boolean |
hasChapter()
Answers if this page is contained in a chapter.
|
protected boolean |
hasSection()
Answers if this page is contained in a section.
|
protected com.itextpdf.text.Chapter |
newChapter(com.itextpdf.text.Chapter chapter)
Returns the chapter object for the page.
|
protected com.itextpdf.text.Section |
newSection(com.itextpdf.text.Chapter chapter)
Returns the section object for the page.
|
protected void |
recurseXml(org.w3c.dom.NodeList children)
Recurses the pages's XML child nodes and creates the pages's PDF
content.
|
protected com.itextpdf.text.pdf.PdfPTable |
toPdf()
Performs translation of the XML page to a PDF page.
|
private static final long serialVersionUID
protected org.w3c.dom.Node __node
protected com.itextpdf.text.pdf.PdfPTable __content
protected XmlPage(org.w3c.dom.Node node)
node
- (Node) A page node from the XML document object.protected java.lang.String getAttr(java.lang.String name)
name
- (String) The name of the attribute to retrieve.protected boolean getReset()
protected java.lang.String getChapter()
protected boolean hasChapter()
true
if contained in a chapter,
otherwise false
.protected com.itextpdf.text.Chapter newChapter(com.itextpdf.text.Chapter chapter) throws java.lang.Exception
chapter
- (Chapter) The previous page's chapter. Will be
null
if this is the first page of the document.java.lang.Exception
- - if an error occurs during processing.protected java.lang.String getSection()
protected boolean hasSection()
true
if contained in a section,
otherwise false
.protected com.itextpdf.text.Section newSection(com.itextpdf.text.Chapter chapter) throws java.lang.Exception
chapter
- (Chapter) The current page's chapter.java.lang.Exception
- - if an error occurs during processing.protected void recurseXml(org.w3c.dom.NodeList children) throws java.lang.Exception
children
- (NodeList) The page's child nodes.java.lang.Exception
- - if an error occurs during processing.protected com.itextpdf.text.pdf.PdfPTable toPdf() throws java.lang.Exception
java.lang.Exception
- - if an error occurs during processing.