I need to create PDFs using the table.ImportDataTable method as shown below, however, each datatable contains different number of columns and their width are also different in each datatable. How can I define the width size and the number of columns before importing each datatable into the PDF object? Can Aspose.PDF sets all the column widths automatically based on the data being imported?
Pdf pdf1 = new Pdf();
Section sec1 = pdf1.Sections.Add();
Aspose.Pdf.Table tab1 = new Aspose.Pdf.Table();
tab1.ColumnWidths = "100 100 100 100"; // prefine width does not work for me. How can I define widths dynamically?
tab1.ImportDataTable(myDataTable, true, 0, 0);
pdf1.Save("asposeExportDataToPDF.pdf", Aspose.Pdf.SaveType.OpenInBrowser, this.Response);