public static IT.Section AddFormattedSection(Section section, IT.Chapter chapter)
        {
            IT.Section Formattedsection = chapter.AddSection("Title");
            Formattedsection.Title = null;

            foreach (var item in section.SubElements)
            {
                Formattedsection.Add(GetElement(item));
            }

            return Formattedsection;
        }
Ejemplo n.º 2
0
 /* ----------------------------------------------------------------- */
 /// AddSection
 /* ----------------------------------------------------------------- */
 private void AddSection(iText.Section parent, Element element)
 {
     var style = (element.Depth == 1) ? _policy.Chapter : _policy.Section;
     var title = new iText.Paragraph(element.Value, style.Font);
     title.SpacingAfter = style.Spacing;
     iText.Section section = (parent == null) ? new iText.Chapter(title, _chapter++) : parent.AddSection(title);
     section.IndentationLeft = style.Indent;
     section.TriggerNewPage = style.TriggerNewPage;
     ++_index;
     this.AddElements(section);
     if (parent == null) _doc.Add(section);
 }