Hi,
I created a pdf document from c# code but I have a 19 columns and I would like to extend the width of the table.
I used the next code:
var tablaDeptos = new PdfPTable(19);
//float[] widths = new float[] { 1, 1.5F, 2, 1, 1, 2, 2, 2, 2, 2, 2, 1.5F, 2 };
float[] widths = new float[] { 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2 };
tablaDeptos.SetWidths(widths);
tablaDeptos.TotalWidth = 900f;
Font fontTitulosDeptos = FontFactory.GetFont("Arial", 9, Color.WHITE);
var celda1 = new PdfPCell(new Phrase("U.F", fontTitulosDeptos));
celda1.BackgroundColor = new Color(172, 158, 117 );
var celda2 = new PdfPCell(new Phrase("Piso-Depto", fontTitulosDeptos));
celda2.BackgroundColor = new Color(172, 158, 117 );
var celda3 = new PdfPCell(new Phrase("Propietario", fontTitulosDeptos));
celda3.BackgroundColor = new Color(172, 158, 117 );
var celda4 = new PdfPCell(new Phrase("%A", fontTitulosDeptos));
celda4.BackgroundColor = new Color(172, 158, 117 );
var celda5 = new PdfPCell(new Phrase("%B", fontTitulosDeptos));
celda5.BackgroundColor = new Color(172, 158, 117 );
var celda6 = new PdfPCell(new Phrase("%C", fontTitulosDeptos));
celda6.BackgroundColor = new Color(172, 158, 117);
var celda7 = new PdfPCell(new Phrase("%D", fontTitulosDeptos));
celda7.BackgroundColor = new Color(172, 158, 117);
var celda8 = new PdfPCell(new Phrase("%E", fontTitulosDeptos));
celda8.BackgroundColor = new Color(172, 158, 117);
var celda9 = new PdfPCell(new Phrase("Exp. A", fontTitulosDeptos));
celda9.BackgroundColor = new Color(172, 158, 117 );
var celda10 = new PdfPCell(new Phrase("Exp. B", fontTitulosDeptos));
celda10.BackgroundColor = new Color(172, 158, 117);
var celda11 = new PdfPCell(new Phrase("Exp. C", fontTitulosDeptos));
celda11.BackgroundColor = new Color(172, 158, 117);
var celda12 = new PdfPCell(new Phrase("Exp. D", fontTitulosDeptos));
celda12.BackgroundColor = new Color(172, 158, 117);
var celda13 = new PdfPCell(new Phrase("Exp. E", fontTitulosDeptos));
celda13.BackgroundColor = new Color(172, 158, 117);
var celda14 = new PdfPCell(new Phrase("Total General", fontTitulosDeptos));
celda14.BackgroundColor = new Color(172, 158, 117 );
var celda15 = new PdfPCell(new Phrase("Saldo Ant", fontTitulosDeptos));
celda15.BackgroundColor = new Color(172, 158, 117 );
var celda16 = new PdfPCell(new Phrase("Punitorios", fontTitulosDeptos));
celda16.BackgroundColor = new Color(172, 158, 117 );
var celda17 = new PdfPCell(new Phrase("G. Part.", fontTitulosDeptos));
celda17.BackgroundColor = new Color(172, 158, 117 );
var celda18 = new PdfPCell(new Phrase("Redon.", fontTitulosDeptos));
celda18.BackgroundColor = new Color(172, 158, 117 );
var celda19 = new PdfPCell(new Phrase("Saldo", fontTitulosDeptos));
celda19.BackgroundColor = new Color(172, 158, 117 );