Table width

Is it possible to make a table wider then my paragraph width? When I set the width via builder.CellFormat.Width it defaults to the paragraph width.

Hi

Thanks for your request. Could you please attach your input and expected documents here? Also, please show me the code which you use. I will investigate the problem and provide you more information.
Best regards,

Hi,

Thank you for the fast response. This is the code that i use to build the table:

builder.CellFormat.Borders.LineStyle = LineStyle.Single;
builder.CellFormat.Borders.Color = Color.Black;

builder.Font.Size = 10;

#region First Header Row
builder.InsertCell();
builder.CellFormat.Width = 300;
builder.Write("");

builder.InsertCell();
builder.CellFormat.Width = 100;
builder.Write("LEBA");

builder.InsertCell();
builder.CellFormat.Width = 100;
builder.Write("ZEE dagprijs");

builder.InsertCell();
builder.CellFormat.Width = 100;
builder.Write("ZEE dagprijs");

builder.InsertCell();
builder.CellFormat.Width = 200;
builder.Write("APX");

builder.InsertCell();
builder.CellFormat.Width = 200;
builder.Write("Onbalans Short");

builder.InsertCell();
builder.CellFormat.Width = 200;
builder.Write("Onbalans Long");
builder.EndRow();
#endregion

#region Second Header Row

builder.InsertCell();
builder.CellFormat.Width = 300;
builder.Write("");

builder.InsertCell();
builder.CellFormat.Width = 100;
builder.Write("");

builder.InsertCell();
builder.CellFormat.Width = 100;
builder.Font.Italic = true;
builder.Write("BID");

builder.InsertCell();
builder.CellFormat.Width = 100;
builder.Write("Offer");

builder.InsertCell();
builder.CellFormat.Width = 100;
builder.Write("Base");

builder.InsertCell();
builder.CellFormat.Width = 100;
builder.Write("Peak");

builder.InsertCell();
builder.CellFormat.Width = 100;
builder.Write("Base");

builder.InsertCell();
builder.CellFormat.Width = 100;
builder.Write("Peak");

builder.InsertCell();
builder.CellFormat.Width = 100;
builder.Write("Base");

builder.InsertCell();
builder.CellFormat.Width = 100;
builder.Write("Peak");

builder.EndRow();
#endregion

If i make one of the cells wider, the others become smaller. I want the table become wider, so i can insert my data. At the moment it appears that i cannot make the table wider then the paragraph width. In word you can do this by dragging the column.

Hi

Thank you for additional information. Please try setting RowFormat.AllowAutoFit to false, see the following code:

DocumentBuilder builder = new DocumentBuilder(doc);
builder.RowFormat.AllowAutoFit = false;

Best regards,

This solved my problem. Thank you for the assistance.