I am trying to add a blank Cell in a row. Basically I am trying replicate the following html scenario using Aspose.
1) 799.4 CACHEXIA
Is there a way to add a blank Cell just the way I have for my second
Thanks,
Saikat
I am trying to add a blank Cell in a row. Basically I am trying replicate the following html scenario using Aspose.
1) 799.4 CACHEXIA
Is there a way to add a blank Cell just the way I have for my second
Thanks,
Saikat
I am trying to add a blank Cell in a row. Basically I am trying replicate the following html scenario using Aspose.
Is there a way to add a blank Cell just the way I have for my second
Thanks,
Saikat
Hi Saikat,
//Instantiate Document object by
calling its empty constructor<o:p></o:p>
Aspose.Pdf.Document doc = new Aspose.Pdf.Document();
// add page to Document object
Aspose.Pdf.Page page= doc.Pages.Add();
//Instantiate a table object
Aspose.Pdf.Table tab1 = new Aspose.Pdf.Table();
//Add the table in paragraphs collection of the PDF page
page.Paragraphs.Add(tab1);
//Set with column widths of the table
tab1.ColumnWidths = "130 50 80";
//Set default cell border using BorderInfo object
tab1.DefaultCellBorder = new Aspose.Pdf.BorderInfo(Aspose.Pdf.BorderSide.All, 0.1F);
//Set table border using another customized BorderInfo object
tab1.Border = new Aspose.Pdf.BorderInfo(Aspose.Pdf.BorderSide.All, 1F);
//Create MarginInfo object and set its left, bottom, right and top margins
Aspose.Pdf.MarginInfo margin = new Aspose.Pdf.MarginInfo();
margin.Top = 5f;
margin.Left = 5f;
margin.Right = 5f;
margin.Bottom = 5f;
//Set the default cell padding to the MarginInfo object
tab1.DefaultCellPadding = margin;
//Create rows in the table and then cells in the rows
Aspose.Pdf.Row row1 = tab1.Rows.Add();
row1.Cells.Add("1) 799.4 CACHEXIA");
row1.Cells.Add("");
row1.Cells.Add("3rd Column");
Aspose.Pdf.Row row2 = tab1.Rows.Add();
row2.Cells.Add("item1");
row2.Cells.Add("item2");
row2.Cells.Add("item3");
//Save the Pdf
doc.Save("c:/pdftest/TableResult_DOM.pdf");
Thanks, it worked.
how to ask question regarding pdf?
Thanks for contacting support.
You can freely ask any query related to Aspose.Pdf product family and we will love to answer it.