Suggestions for wide tables in the pdf files

Is there a guideline or suggestion for handling wide tables with the Aspose pdf components? Is there anything built-in to support this issue? Or what jave people done?

I have a few tables that are wider than even the landscape orientation will fit.

Thanks,

Brad

Hi Brad,

Can you please help me understand your requirement with the help of some example? Kindly elaborate a little bit, so we would be able to help you out.

We’re sorry for the inconvenience.
Regards,

Basically, I have a spreadsheet my boss wants embedded into a pdf we are generating. Useing the Aspose Cells and PDF classes, I can easily do this. The problem, which I believe is just a pdf issue, is that a 20 column table is generally too long even for the landscape view. It's just too many columns.

I was hoping someone else had come up with a logical/clean solution for this,. Either with some builtin Aspose Pdf class functionality or maybe a nice design solution.

Thanks.

Is there some kind of a "FitToPage" feature for the tables in a pdf file?

I tried using the ColumnWIdths property of the pdf table:

tableRunoffDetails.ColumnWidths = "5% 5% 5% 5% 5% 5% 5% 5% 5% 5% 5% 5% 5% 5% 5% 5% 5% 5%";

tableRunoffDetails.DefaultCellBorder = new BorderInfo((int)BorderSide.All,0.1F);

tableRunoffDetails.ImportDataTable(excelTable, true, 0, 0, excelTable.Rows.Count+1, excelTable.Columns.Count);

This generates the runtime error: "The width of each column must be set before import array"

Any help?

Can someone tell me what is wrong with the following code:

tableRunoffDetails.ColumnWidths = "5% 5% 5% 5% 5% 5% 5% 5% 5% 5% 5% 5% 5% 5% 5% 5% 5% 5%";

tableRunoffDetails.DefaultCellBorder = new BorderInfo((int)BorderSide.All,0.1F);

tableRunoffDetails.ImportDataTable(excelTable, true, 0, 0, excelTable.Rows.Count+1, excelTable.Columns.Count);

//It generates the runtime error: The width of each column must be set before import array

//If I replace the ColumnWidths like with the following, it works, but is obviously not determining the col width automatically

tableRunoffDetails.ColumnWidths = "45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45";

Amy ideas?

Hi Brad,

Can you please share a small working sample application with us, along with the input files, so we would be able to reproduce the same issue at our end as well? I’m afraid, it is very important for us to reproduce your particular issue in order to understand and then resolve it.

We’re sorry for the inconvenience and appreciate your cooperation.
Regards,

Hi Brad,

You may follow this issue on your other thread. I have requested a sample to reproduce the issue; please do the needful, so we could move forward with our investigation.

Regards,

Hello Brad,

Thanks for using our products.

In case the table is large enough that its crossing the right side border of the page, please try using the IsVerticalBroken property of Table class. This property gets or sets a bool value that indicates whether the table is broken vertically as the table is printed out of the right page margin. In case you need to have the vertically broken table is in the same page, you may consider using the property IsVerticalBrokenInSamePage of Table class.

In case you still face any problem, as shared by shahzad, please share the code snippet so that we can test the scenario at our end. We apologize for your inconvenience.