Set the padding to 0.

Paulo

________________________________
From: Daniel Lopez [mailto:daniel.lopez...@gmail.com]
Sent: Thursday, January 26, 2012 2:16 PM
To: itext-questions@lists.sourceforge.net
Subject: [iText-questions] PdfpTable does not line up with left justified text

Hello all,

I am using itext1.4.6, and I know that this is extremely old, but I am hoping 
this problem can be fixed without upgrading, because I simply cant upgrade at 
this point.

I have 3 pdfPTables that are all of varying widths.  Unfortunately, when I try 
to set their horizontal Alignment to the left, it doesn't line up with the 
regular (non-table) text.  It is very close, but it is just a tick off.  Though 
this table does not have a border, I am thinking that there is some sort of 
invisible border that is making it not go all the way to the left?  Here is how 
I am setting up my table:

                        float[] widths2 = {3,13};

                        PdfPTable majorsTable = new PdfPTable(2);
                        majorsTable.setHorizontalAlignment(Element.ALIGN_LEFT);
                        majorsTable.setSpacingAfter(5);
                        majorsTable.setSpacingBefore(12);
                        majorsTable.setKeepTogether(true);
                        majorsTable.setWidthPercentage(75);
                        majorsTable.setWidths(widths2);

Very simple, but I was wondering if there is some sort of trick or method to 
get this table to left justify correctly, or if I am stuck with it being just a 
tick off?
------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
_______________________________________________
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

iText(R) is a registered trademark of 1T3XT BVBA.
Many questions posted to this list can (and will) be answered with a reference 
to the iText book: http://www.itextpdf.com/book/
Please check the keywords list before you ask for examples: 
http://itextpdf.com/themes/keywords.php

Reply via email to