Пример #1
0
        private PdfGrid createTable(string html, XHeaderBasicProperties basicProperties)
        {
            var table = new PdfGrid(1)
            {
                RunDirection    = (int)basicProperties.RunDirection,
                WidthPercentage = basicProperties.TableWidthPercentage
            };
            var htmlCell = new XmlWorkerHelper
            {
                Html         = html,
                RunDirection = basicProperties.RunDirection,
                CssFilesPath = basicProperties.CssFilesPath,
                ImagesPath   = basicProperties.ImagesPath,
                InlineCss    = basicProperties.InlineCss,
                DefaultFont  = basicProperties.PdfFont.Fonts[0]
            }.RenderHtml();

            htmlCell.Border = 0;
            table.AddCell(htmlCell);

            if (basicProperties.ShowBorder)
            {
                return(table.AddBorderToTable(basicProperties.BorderColor, basicProperties.SpacingBeforeTable));
            }
            table.SpacingBefore = basicProperties.SpacingBeforeTable;

            return(table);
        }
 /// <summary>
 /// Properties of groups headerds.
 /// </summary>
 public void GroupHeaderProperties(XHeaderBasicProperties data)
 {
     _builder.GroupHeaderProperties = data;
 }
 /// <summary>
 /// Properties of pages headerds.
 /// </summary>
 public void PageHeaderProperties(XHeaderBasicProperties data)
 {
     _builder.PageHeaderProperties = data;
 }