How to Adjust the Cell Size in iTextSharp
The program iTextSharp is used to create Adobe Acrobat PDF documents. You can format the PDF files however you wish by editing the page attributes, including the cell size. Cells hold text in tables, charts and spreadsheets. If the text you enter doesn't fit in a cell at its default size, adjust the size of the cell as needed. To change the cell size, edit the document creation commands. You can only adjust the width of the cells.
Instructions
-
-
1
Open the document containing the cell you wish to edit.
-
2
Locate the commands for the cell you want to edit. If the cell you want to edit contains the text "Profits," locate the command titled, "(cell=Profits)." Locate the command above the "Profits" command titled, "widths = Xf, Yf" where "X" and "Y" are numbers.
-
-
3
Delete the "X" and "Y" numbers and replace them with the adjusted width you want the cells to have. The numbers represent the width of the cells and must equal the total width of the table. For instance, if the total width of the table is 200, "X" and "Y" must equal 200. If the width of the table is 200, the command "widths = 75f, 125f" is correct; the command "widths = 20f, 45f" is not.
-
1