I have one page xls file which contains two columns of data. The first column contains strings and the second columns contains some numbers. After converting the xls to PDF, the PDF got divided into two pages. One page contains the first column and the other page contains the second column. The page is set to use Landscape mode. Can you please let me know how to place both columns on the same page? In the XLS file before coversion, both columns fit on the same page. If changing the column width will solve this issue, how do I adjust the PDF's column width?
Below is my code:
Workbook workbook = new Workbook();
Worksheet sheet = workbook.Worksheets;
sheet.Name = "Expenses";
string fileName = "logo.gif";
//Obtain the cells of the first worksheet.
Aspose.Cells.Cells cells = workbook.Worksheets.Cells;
//Accessing a column from the Columns collection
Column columnCurrency = cells.Columns;
//Column columnDates = cells.Columns;
Aspose.Cells.Row rowHeader = cells.Rows; //first row of data?
style = workbook.Styles[workbook.Styles.Add()];
style.Number = 7;
flag = new StyleFlag();
flag.NumberFormat = true;
sheet.Cells.ImportDataTable(dtData, false, "A8");
// Converting XLS file to PDF through Aspose.Pdf using Aspose.Pdf xml file as a medium
Aspose.Pdf.Pdf pdf = new Aspose.Pdf.Pdf();
pdf.IsLandscape = true;
pdf.Save("xls2pdf.pdf", Aspose.Pdf.SaveType.OpenInAcrobat, this.Response);