Hi,

sorry it takes me some time to respond to questions here.

Instead of using a Phrase, use a Paragraph to construct the text in the cell 
and then set the leading of the Paragraph to the desired amount. That should 
fix the problem.

Greetings,
Mark

On Thursday 26 June 2008, [EMAIL PROTECTED] wrote:
> Hello,
>
> here is some example code for my problem:
>
>                         com.lowagie.text.Document document = new
> com.lowagie.text.Document();
>                         String doc1 = "RtfWriter.rtf";
>                         String doc2 = "RtfWriter2.rtf";
>                        
> com.lowagie.text.rtf.RtfWriter.getInstance(document, new
> FileOutputStream(doc1));
>                        
> com.lowagie.text.rtf.RtfWriter2.getInstance(document, new
> FileOutputStream(doc2));
>                         document.open();
>
>                         com.lowagie.text.Table table = new
> com.lowagie.text.Table(1);
>                        
> table.setBorder(com.lowagie.text.Rectangle.NO_BORDER); table.setWidth(90);
>                         table.setTableFitsPage(true);
>
>                         String text = "This is line one ...\nthis is line
> two ...";
>
>                         com.lowagie.text.Cell cell = new
> com.lowagie.text.Cell(new com.lowagie.text.Phrase(text,
>                                
> com.lowagie.text.FontFactory.getFont("Arial", 11,
> com.lowagie.text.Font.NORMAL)));
>                        
> cell.setHorizontalAlignment(com.lowagie.text.Element.ALIGN_CENTER);
> cell.setBorder(com.lowagie.text.Rectangle.NO_BORDER); cell.setLeading(1.5f
> * 11);
>                         table.addCell(cell);
>
>                         document.add(table);
>
>                         document.close();
>
>                         Runtime.getRuntime().exec("RUNDLL32
> url.dll,FileProtocolHandler " + doc1);
>                         Runtime.getRuntime().exec("RUNDLL32
> url.dll,FileProtocolHandler " + doc2);
>
> I create two documents with iText 1.4.4. One with the (deprecated)
> RtfWriter class and the other one with the newer RtfWriter2 class.
> The horizontal space between the two lines is in the first document (the
> one of RtfWriter) normal.
> In the other document the horizontal space is at least 16pt says my MS Word
> 2007.
>
> Does anyone know why this happens?
>
> best regards
> Marcus
> Germany
>
>
> -------------------------------------------------------------------------
> Check out the new SourceForge.net Marketplace.
> It's the best place to buy or sell services for
> just about anything Open Source.
> http://sourceforge.net/services/buy/index.php
> _______________________________________________
> iText-questions mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/itext-questions
>
> Do you like iText?
> Buy the iText book: http://www.1t3xt.com/docs/book.php
> Or leave a tip: https://tipit.to/itexttipjar



-- 
All replies must be addressed to the mailing list.
Any replies/questions not addressed to the mailing list will be ignored.

Attachment: signature.asc
Description: This is a digitally signed message part.

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Do you like iText?
Buy the iText book: http://www.1t3xt.com/docs/book.php
Or leave a tip: https://tipit.to/itexttipjar

Reply via email to