/// <summary>
 /// generator for body tag
 /// </summary>
 public BodyGenerator(PDFTemplate.PDFTemplate template, XmlNode bodyNodeXml)
 {
     pdfTemplate = template;
     bodyNode = bodyNodeXml;
     if (bodyNode != null)
         bodyItems = bodyNode.SelectNodes(".//row|.//table");
 }
        /// <summary>
        /// initialise template
        /// </summary>
        /// <param name="template">caller instance</param>
        /// <param name="tableNode"></param>
        public TableGenerator(PDFTemplate.PDFTemplate template, XmlNode tableNode)
        {
            pdfTemplate = template;

            if (tableNode != null)
            {
                var tableElt = new Table(tableNode.Attributes);
                XmlNode tableHeadNode = tableNode.SelectSingleNode(".//tablehead");
                XmlNode tableLoopNode = tableNode.SelectSingleNode(".//tableloop");
                XmlNode tableFootNode = tableNode.SelectSingleNode(".//tablefoot");

                this.tableElement = tableElt;
                tableRowGroupHead = tableHeadNode != null ? BuildTableRowGroup(tableHeadNode) : null;
                tableRowGroupLoop = tableLoopNode != null ? BuildTableRowGroup(tableLoopNode) : null;
                tableRowGroupFoot = tableFootNode != null ? BuildTableRowGroup(tableFootNode) : null;
            }
        }