How can I set cell width and height in itextsharp pdf cell ceration using c#. I just use
cell.width = 200f;
But it should display the error message.
width can not be set.
What should I do?..
Neha
http://indaravind.blogspot.in/2009/02/itextsharp-table-column-width.html
VB:
Dim intTblWidth() As Integer = {12, 10, 26, 10}
C#:
int[] intTblWidth = { 12, 10, 26, 10 };
You don't set the width of a cell.
you should set the width of the columns. And you can do that by applying them on the table object:
float[] widths = new float[] { 1f, 2f };
table.SetWidths(widths);
The answer from Neha is to set the width of the table object
more reference material here: http://www.mikesdotnetting.com/Article/86/iTextSharp-Introducing-Tables
JumpingJack
cell.width = 200f;
you have to put capital W on width correct is cell.Width = 200f;
来源:https://stackoverflow.com/questions/9208482/how-to-set-the-cell-width-in-itextsharp-pdf-creation