Spire.Doc is a professional Word .NET library specifically designed for developers to create, read, write, convert and print Word document files from any .NET platform (C#, VB.NET, ASP.NET, .NET Core) and Java applications (J2SE and J2EE) with fast and high quality performance.

Sun Jan 16, 2011 3:59 pm

Is there an example or description on how to create and use a Spire.Doc.Column?

Posts: 3
Joined: Sun Jan 16, 2011 3:50 pm

Mon Jan 17, 2011 11:16 am

Thanks for your inquiry.
You just need to call AddColumn method of your section, and append content to that section as usually.
There is a demo which adds two columns into a section:
Code: Select all
            Document document = new Document();
            Section section = document.AddSection();

            //the unit of all measures below is point, 1point = 0.3528 mm
            section.PageSetup.PageSize = PageSize.A4;
            section.PageSetup.Margins.Top = 72f;
            section.PageSetup.Margins.Bottom = 72f;
            section.PageSetup.Margins.Left = 89.85f;
            section.PageSetup.Margins.Right = 89.85f;

            section.AddColumn(section.PageSetup.ClientWidth / 2 - 20, 10);
            section.AddColumn(section.PageSetup.ClientWidth / 2 - 20, 10);

            for (int i = 0; i < 300; i++)
                section.AddParagraph().AppendText(String.Format("Paragraph_{0}", i));

            //Save doc file.
            document.SaveToFile("Test.doc", FileFormat.Doc);

            //Launching the MS Word file.
Technical Support / Developer,
e-iceblue Support Team
User avatar

Posts: 180
Joined: Mon Nov 08, 2010 3:11 pm

Return to Spire.Doc