Click here to Skip to main content
13,148,427 members (60,433 online)
Rate this:
Please Sign up or sign in to vote.
See more:
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 20: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)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy |
Web02 | 2.8.170924.2 | Last Updated 22 Feb 2013
Copyright © CodeProject, 1999-2017
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