I don't know if Mark speaks French, but the question is:
"How to underline Chunk objects in RTF?"
br,
Bruno

valerie marc wrote:
Bonjour,

Je voudrais doublement souligner dans l'objet Chunck.
J'ai essayé le code mis sur votre site qui fonctionne
tres bien pour un document Pdf, mais ensuite j'ai
voulu faire le meme travail pour un document Rtf, et
la je ne vois aucun trait apparaitre dans mon document
...

Peux t'on doublement souligner pour un document Rtf ?

Merci d'avance,

Valerie


Code utilisé de votre site :

// step 3: we open the document
document.Open();
// step 4:
Chunk underlined = new Chunk("underlined");
underlined.SetUnderline(0.2f, -2f);
Paragraph p = new Paragraph("The following chunk is
");
p.Add(underlined);
document.Add(p);
Chunk strikethru = new Chunk("strike through
example");

strikethru.SetUnderline(0.5f, 3f);
document.Add(strikethru);
document.Add(Chunk.NEWLINE);
document.Add(Chunk.NEWLINE);
document.Add(Chunk.NEWLINE);
Chunk c;
c = new Chunk("Multiple lines");
c.SetUnderline(new iTextSharp.text.Color(0xFF, 0x00,
0x00), 0.0f, 0.3f, 0.0f, 0.4f,
PdfContentByte.LINE_CAP_ROUND);
c.SetUnderline(new iTextSharp.text.Color(0x00, 0xFF,
0x00), 5.0f, 0.0f, 0.0f, -0.5f,
PdfContentByte.LINE_CAP_PROJECTING_SQUARE);
c.SetUnderline(new iTextSharp.text.Color(0x00, 0x00,
0xFF), 0.0f, 0.2f, 15.0f, 0.0f,
PdfContentByte.LINE_CAP_BUTT);
document.Add(c);
document.Add(Chunk.NEWLINE);
document.Add(Chunk.NEWLINE);
document.Add(Chunk.NEWLINE);
c = new Chunk("Multiple lines",
FontFactory.GetFont(FontFactory.HELVETICA, 24));
c.SetUnderline(new iTextSharp.text.Color(0xFF, 0x00,
0x00), 0.0f, 0.3f, 0.0f, 0.4f,
PdfContentByte.LINE_CAP_ROUND);
c.SetUnderline(new iTextSharp.text.Color(0x00, 0xFF,
0x00), 5.0f, 0.0f, 0.0f, -0.5f,
PdfContentByte.LINE_CAP_PROJECTING_SQUARE);
c.SetUnderline(new iTextSharp.text.Color(0x00, 0x00,
0xFF), 0.0f, 0.2f, 15.0f, 0.0f,
PdfContentByte.LINE_CAP_BUTT);
document.Add(c);

document.Close();

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://itext.ugent.be/itext-in-action/

Reply via email to