We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Creating PDF does not wrap Column Headers similar to the EXCEL production

I have attached an EXCEL spreadsheet and you can see that the column headers are wrapping as necessary. When the same workbook is saved as PDF, a couple columns do not wrap accordingly.


The code is:
			for (int col = 1; col < columnCount; col++)
{
Cell headerCell = cells[2, col];
Style headerCellStyle = headerCell.GetStyle();
headerCellStyle.IsTextWrapped = true;
headerCellStyle.HorizontalAlignment = TextAlignmentType.Center;
headerCellStyle.VerticalAlignment = TextAlignmentType.Center;
headerCell.SetStyle(headerCellStyle);
cells.SetColumnWidth(col, 11.22);
if (headerCell.StringValue.Length > 17)
{
cells.SetColumnWidth(col, 13.5);
}
}

Hi,


Please try our latest version v7.0.1:
http://www.aspose.com/community/files/51/.net-components/aspose.cells-for-.net/entry328122.aspx
I have tested converting your template file to PDF, it works fine as MS Excel.

Thank you.

The attached documents were in fact created with the latest version of ASPOSE (v7.0.1).

What would the next step be to finding the problem?

The problem is intermittent and is not presenting itself at this time.