Quantcast
Channel: Aspose.Pdf Product Family
Viewing all articles
Browse latest Browse all 3131

How to find dimensions of a cell I just added to page

$
0
0
Hi,

Is there anyway I can find out the dimensions + height + width of cell I just added to the page ?

This is what I am doing,

           Document document = new Document();
            Page page = document.Pages.Add();
            
            for(int i = 0; i <= 10; i++)
            {
                var table = new Table();
                table.ColumnWidths = "200 200";
                Row row = table.Rows.Add(); 
                row.Cells.Add("Row Number: " + i);
                row.Cells.Add("Random Number: " + i + 100);
                
                // Here I need to add LinkAnnotation to 2nd Column, so I need to know dimensions
                
                page.Paragraphs.Add(table);
            }
            
            document.Save(@"C:\temp\CellDimensions.pdf");


I want to know dimensions of each cell.

I know how to add annotations but i want to know the rectangular dimensions of each cell, so i could provide them to this method,

  LinkAnnotation link =  new LinkAnnotation(page, new Aspose.Pdf.Rectangle(100, 100, 300, 300));

Cheers
Hannah

Viewing all articles
Browse latest Browse all 3131

Trending Articles