Mark Hall-6 wrote:
> 
> You can use the com.lowagie.text.rtf.direct.RtfDirectContent class to add 
> arbitrary RTF code at any place in the document. You will have to strip
> any 
> RTF header information and similar yourself, as otherwise you will
> probably 
> end up with an invalid document.
> 
> Greetings,
> Mark
> 

Thanks for your reply so quickly. Do you mean the
com.lowagie.text.rtf.direct.RtfDirectContent class's
writeContent(OutputStream out) method? I don't know how to use it correctly.
Please look at my code:

    RtfWriter2 writer=RtfWriter2.getInstance(document, new
FileOutputStream("C:\\HelloWorld.rtf"));
    writer.open();
    Table table=new Table(1);
    writer.add(table);
    
    RtfDirectContent rtfDirectContent=new RtfDirectContent("\par Hello,
world!\cell");
    //I want to add rtfdirectContent to this table, but I don't know how to
do it.

    writer.close();

I don't know if I can use RtfWriter2 and RtfDirectContent.writeContent in
the same time. Please help me.

Thanks for your reply.


    
    

    
-- 
View this message in context: 
http://www.nabble.com/How-can-I-insert-a-Rtf-document-to-another-Rtf-document%27s-table--tf4447295.html#a12697905
Sent from the iText - General mailing list archive at Nabble.com.


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
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