Sign In  Sign Up Live-Chat

How to put 2 tables side by side on pdf document

Last post 05-14-2008, 2:59 AM by codewarior. 2 replies.
Sort Posts: Previous Next
  •  05-13-2008, 3:51 PM 126775

    How to put 2 tables side by side on pdf document

    Hello,

    I need to put two tables side by side on my PDF document

    when i do this:

    ...

    Dim tab1 As Aspose.Pdf.Table = New Aspose.Pdf.Table()

    Dim tab2 As Aspose.Pdf.Table = New Aspose.Pdf.Table()

    sec1.Paragraphs.Add(tab1)

     sec1.Paragraphs.Add(tab2)

    ...

    tab2 is created below tab1 and i want them to be next to each other

    I have no idea how to do it

     

     
  •  05-13-2008, 7:12 PM 126793 in reply to 126775

    Re: How to put 2 tables side by side on pdf document

    Hi,

    Thank you for considering Aspose.

    You can use nested table.


    Tommy Wang
    Lead Developer
    Aspose Changsha Team
    About Us
    Contact Us
     
  •  05-14-2008, 2:59 AM 126838 in reply to 126775

    Re: How to put 2 tables side by side on pdf document

    Hi,

    Thankyou for considering Aspose.Pdf

    Yes its prety possible to add two table side by side. Infact logically its like adding a table into another table.

    To add a nested table, all you need is to add a new table into the paragraphs collection of any desired cell. Simply create a table, than add a row to the table. Create 2 columns and in second column add another table.

    //Create a table
    Table tab1 = new Table();

    //Add the table into the paragraphs collection of section

    sec1.Paragraphs.Add(tab1);

     

    //Add a row into the table

    Row row1 = tab1.Rows.Add();

     

    //Add 1st cell in the row

    row1.Cells.Add("left cell");

     

    //Add 2nd cell in the row

    Cell cell2 = row1.Cells.Add();

     

    //Create a table to be nested with the reference of 2nd cell in the row

    Table tab2 = new Table(cell2);

     

    //Add the nested table into the paragraphs collection of the 2nd cell

    cell2.Paragraphs.Add(tab2);

     

    For more information visit Create Nested Table


    Nayyer Shahbaz
    Support Developer
    Aspose Changsha Team
    About Us
     
View as RSS news feed in XML