BTW, not sure if the comment about a new thread everytime is to me, but all I'm doing is clicking "reply", as I'm doing it via email....
Anyway... Sounds like kinda what you need to do is something like this: Set the first cell padding, so it's something like: cell.setPaddingLeft(5f); cell.setPaddingRight(5f); cell.setPaddingTop(0f); // No padding on top cell cell.setPaddingBottom(2f); Then every cell from then: cell.setPaddingLeft(5f); cell.setPaddingRight(5f); cell.setPaddingTop(2f); // Balanced top and bottom padding rather than just on the bottom cell.setPaddingBottom(2f); Then the last cell as: cell.setPaddingLeft(5f); cell.setPaddingRight(5f); cell.setPaddingTop(2f); cell.setPaddingBottom(0f); // remove padding from bottom cell (IF necessary) Or something like that. Basically unless your trying to get the text beyond the borders of the cell, you shouldn't be using the negative values. As a side note, the whole border thing frustrated me for weeks at one point when trying to get things to align, and wanting borders to not show and others to align etc. Just stick with it, there will be a workaround. Also.. what do you mean setting 0 for the padding doesn't remove all the padding? Do you have a screen shot? BTW, you can always set cell height manually as well... -----Original Message----- From: fhomasp [mailto:[email protected]] Sent: 09 June 2010 10:24 To: [email protected] Subject: Re: [iText-questions] PdfPTable padding and spacing I need a bit of padding on the bottom of the cells. If I set for example: cell.setPadding(5); cell.setPaddingTop(0); cell.setPaddingBottom(4); Then the space between the cells is still too large. And I do need bottom padding (sounds like fun) otherwise the text in the cell is placed exactly on the bottom of that cell. The only way I've been able to do this is by setting a negative value in the padding, because setting 0 padding on the top doesn't remove all of the top padding. -- View this message in context: http://itext-general.2136553.n4.nabble.com/PdfPTable-padding-and-spacing-tp2248510p2248534.html Sent from the iText - General mailing list archive at Nabble.com. ------------------------------------------------------------------------------ ThinkGeek and WIRED's GeekDad team up for the Ultimate GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the lucky parental unit. See the prize list and enter to win: http://p.sf.net/sfu/thinkgeek-promo _______________________________________________ iText-questions mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/itext-questions Buy the iText book: http://www.itextpdf.com/book/ Check the site with examples before you ask questions: http://www.1t3xt.info/examples/ You can also search the keywords list: http://1t3xt.info/tutorials/keywords/ Land Registry's House Price Index is now live. www.landregistry.gov.uk If you have received this e-mail and it was not intended for you, please let us know, and then delete it. Please treat our communications in confidence, as you would expect us to treat yours. Land Registry checks all mail and attachments for known viruses, however, you are advised that you open any attachments at your own risk. The original of this email was scanned for viruses by the Government Secure Intranet virus scanning service supplied by Cable&Wireless Worldwide in partnership with MessageLabs. (CCTM Certificate Number 2009/09/0052.) On leaving the GSi this email was certified virus free. Communications via the GSi may be automatically logged, monitored and/or recorded for legal purposes. ------------------------------------------------------------------------------ ThinkGeek and WIRED's GeekDad team up for the Ultimate GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the lucky parental unit. See the prize list and enter to win: http://p.sf.net/sfu/thinkgeek-promo _______________________________________________ iText-questions mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/itext-questions Buy the iText book: http://www.itextpdf.com/book/ Check the site with examples before you ask questions: http://www.1t3xt.info/examples/ You can also search the keywords list: http://1t3xt.info/tutorials/keywords/
