public static DocumentFormat.OpenXml.OpenXmlElement[] GetFormattedSection(MultiColumnSection section)
        {
            List<DocumentFormat.OpenXml.OpenXmlElement> formattedSection = new List<DocumentFormat.OpenXml.OpenXmlElement>();
            Element[] elements = section.SubElements;

            foreach (var element in elements)
            {
                formattedSection.AddRange(ElementFactory.GetElement(element));
            }

            Word.Columns cols = new Word.Columns()
            {
                ColumnCount = (Int16Value)section.NumberOfColumns
            };

            Word.SectionProperties secProps = new Word.SectionProperties(cols);
            Word.ParagraphProperties paraProp = new Word.ParagraphProperties(secProps);
            Word.Paragraph para = new Word.Paragraph(paraProp);

            formattedSection.Add(para);

            return formattedSection.ToArray();
        }
Example #2
0
 public void AddSection(MultiColumnSection section)
 {
     AddElement(section);
 }
Example #3
0
 public void AddSection(MultiColumnSection section)
 {
     PDF.MultiColumnText multiCol = new PDF.MultiColumnText(450);
     multiCol.AddRegularColumns(36, document.PageSize.Width - 36, 18, section.NumberOfColumns);
     AddElements(section, multiCol);
 }
Example #4
0
 public void AddSection(MultiColumnSection section)
 {
     sections.Add(section);
 }