Click here to Skip to main content
11,481,822 members (64,622 online)
Rate this: bad
Please Sign up or sign in to vote.
See more: C# table itextsharp
this is how i create my table, the table is created and post into pdf. this table have 5 rows and 5 columns.
the problem i having is the table showing at the top of the pdf, i have some title and description at the top, how can i manually set the position of the table?

and also how can i resize the width of each column?
PdfPTable table = new PdfPTable(5);
PdfPTable pdft;
for (int j = 1; j < 6; j++)
   for (int i = 1; i < 6; i++)
       pdft = new PdfPTable(1);
       pdft.WidthPercentage = 100f;
       pdft.DefaultCell.Border = 0;
       pdft.AddCell("C" + j.ToString() + i.ToString());
Posted 21-Feb-13 21:48pm

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

Solved, for positioning, use
Paragraph paragraphTable = new Paragraph();
paragraphTable.SpacingAfter = 10f;

now still having problem with the width of each column

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Advertise | Privacy | Mobile
Web03 | 2.8.150520.1 | Last Updated 22 Feb 2013
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100