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

Free Support Forum - aspose.com

Columns width issues

Trying to do a simple 2 column table and adjust the column widths and when I do I just get an empty cell. None of my column data will show up. See code snippet below. PS the only reason I am doing a table for this section is I need the question to be bold with no border and the answer to be next to it in a bordered box. Appreciate any info to help me along.

Dim q1table As New Aspose.Pdf.Table()
q1table.VerticalAlignment = Aspose.Pdf.VerticalAlignment.Center
q1table.ColumnWidths = “200 300”
q1table.DefaultCellTextState.FontSize = 14.0F
'Set the border for table cells
q1table.DefaultCellBorder = New Aspose.Pdf.BorderInfo(Aspose.Pdf.BorderSide.All, 0.5F, Aspose.Pdf.Color.Black)

    'Add row to table
    Dim q1row1 As New Aspose.Pdf.Row
    q1row1.Cells.Add("1. Project Title")
    q1row1.Cells(1).Border = New Aspose.Pdf.BorderInfo(Aspose.Pdf.BorderSide.All, 1.0F, Aspose.Pdf.Color.LightGray)
    q1row1.FixedRowHeight = 15
    q1row1.DefaultCellTextState.HorizontalAlignment = Aspose.Pdf.HorizontalAlignment.Left
    q1row1.VerticalAlignment = Aspose.Pdf.VerticalAlignment.Center
    q1row1.DefaultCellTextState.FontStyle = Aspose.Pdf.Text.FontStyles.Bold


The issue seems related to FixedRowHeight value. The text size + border width is larger than the row height. Would you please try to change it to 16 and create the PDF again.

q1row1.FixedRowHeight = 16