如何在使用c#的itextsharp pdf單元格中設置單元格寬度和高度。我只是用如何在itextsharp中設置單元格寬度pdf創建
cell.width = 200f;
但它應該顯示錯誤信息。
寬度無法設置。
我應該怎麼做..
如何在使用c#的itextsharp pdf單元格中設置單元格寬度和高度。我只是用如何在itextsharp中設置單元格寬度pdf創建
cell.width = 200f;
但它應該顯示錯誤信息。
寬度無法設置。
我應該怎麼做..
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 };
你不設置單元格的寬度。
你應該設置列的寬度。
float[] widths = new float[] { 1f, 2f };
table.SetWidths(widths);
從NEHA答案是設置表對象的寬度
更多的參考材料在這裏:http://www.mikesdotnetting.com/Article/86/iTextSharp-Introducing-Tables
這不w奧克斯了。 – yogihosting 2017-05-18 15:41:03
這就像一個魅力! – Nitesh 2018-01-02 21:00:46
cell.width = 200f;
你有,你可以應用它們在表對象上做把資本W的寬度正確是cell.Width = 200f;
不允許在單元上設置寬度 – Samjongenelen 2016-04-15 08:28:58
哈哈,那是VB和問題是C# – 2012-02-09 10:16:07
邏輯是相同的..他必須定義單元格寬度基本上 – Neha 2012-02-09 10:25:34