In fact, I want to do this (this is in javascript language) :
var style = new
Packages.com.lowagie.text.rtf.style.RtfFont(StyleM.Font,StyleM.Size,StyleM.FontStyle);
style.setColor(StyleM.Color);
var chunk1 = new iText.Chunk(text + "\n",style);
chunk1.setBackground(StyleM.BGColor);
var par = new iText.Paragraph();
par.setAlignment(StyleM.Alignment);
par.setIndentationLeft(StyleM.IndLeft);
par.setIndentationRight(StyleM.IndRight);
par.setSpacingBefore(StyleM.LineSpacing/2);
par.setSpacingAfter(StyleM.LineSpacing/2);
par.setFirstLineIndent(StyleM.FirstInd);
mydoc.add(par);
but without the automatic line breaker at the end of the paragraph. So I tried
to use the Phrase class instead of Paragraph, but there is no method to
configure alignment and indentation.
________________________________
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Howard Shank
Sent: lundi 18 août 2008 16:23
To: Post all your questions about iText here
Subject: Re: [iText-questions] Alignement in a Chunk or Phrase for RTFdocument
Please provide sample code showing what you are attempting to do.
Thanks
Howard Shank
----- Original Message ----
From: "Le Doyen, Loic" <[EMAIL PROTECTED]>
To: Post all your questions about iText here
<itext-questions@lists.sourceforge.net>
Sent: Monday, August 18, 2008 10:12:14 AM
Subject: [iText-questions] Alignement in a Chunk or Phrase for RTF document
Hi,
I have to put words in an RTF document, but without the line breaker at the end
of a Paragraph, so I use Chunk and Phrase to do it but I cannot find any method
to define the alignment of these objects (like the one in the Paragraph class).
Best regards,
Loïc LE DOYEN
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://www.1t3xt.com/docs/book.php