Here is my code:

            n = list.size();
            t = new Table(4, n);
            t.setCellpadding(0.1F);
            t.setCellspacing(0.1F);
//            t.setSpacing(-2.0F);
//            t.setSpaceBetweenCells(-2.0F);
//            t.setSpaceInsideCell(-2.0F);
//            t.setDefaultVerticalAlignment(-2);
//            t.setPadding(-2.0F);

            t.setBorderColor(new Color(255, 255, 255));
            t.setDefaultCellBorderColor(new Color(255, 255, 255));

            t.setWidth(100);
            t.setAlignment("LEFT");
            t.setWidths(new int[] { 2, 16, 2, 80 });

            for (i = 0; i < n; i++)
            {
               ed = (Education) list.get(i);
               if (ed == null) {
                  continue;
               }
               ss = makeEducationForCV(ed);
               if (ss == null) {
                  continue;
               }
              
               cl = new Cell(" ");
               t.addCell(cl);

               ph = new Phrase(ss[0],
                     plainFont);
               cl = new Cell(ph);
               t.addCell(cl);

               cl = new Cell(" ");
               t.addCell(cl);

               ph = new Phrase(ss[1], plainFont);
               cl = new Cell(ph);
               t.addCell(cl);

            }
            document.add(t);
         }

What I'd see is to reduce the space between rows in a table.

-Henry

Mark Hall wrote:

>Ok.
>
>What space between which elements do you wish to reduce. Perhaps some example 
>code of what you are doing and maybe an example of the incorrect document 
>could be provided. Otherwise I'm just guessing.
>
>Greetings,
>Mark
>
>On Friday 10 November 2006 16:46, Henry Lu wrote:
>  
>
>>I tried the followings in the RTF
>>
>>            t.setCellpadding(0.1F);
>>            t.setCellspacing(0.1F);
>>
>>And there is no difference at all.
>>
>>-Henry
>>
>>Mark Hall wrote:
>>    
>>
>>>On Friday 10 November 2006 15:20, Henry Lu wrote:
>>>      
>>>
>>>>In RTF, How do we set the space between rows of a table and lines of
>>>>document? The default space is a littler bit large. Waht we'd like to do
>>>>is to reduce the space between rows/lines. Any idae?
>>>>        
>>>>
>>>Two things:
>>>* Use a descriptive e-mail subject. It was pure luck that I saw that this
>>>e-mail refers to the RTF package.
>>>* Use the cellspacing / cellpadding settings on the Table object.
>>>
>>>Greetings,
>>>Mark
>>>      
>>>
>
>  
>

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

Reply via email to