On Friday 14 July 2006 21:02, Bhupat Raigaga wrote:
> However, I'm little stuck while generating table of contents. In The code
> shown below
>
> setting font and indentation Doesn't seem to work .  How to make this work
> ?
To set the font in the TOC you need the current iText release and then add the 
following code right after where you created the RtfWriter2:

RtfWriter2 writer2 = RtfWriter2.getInstance(doc, new 
FileOutputStream("test.rtf")); // Create the RtfWriter2

writer2.getDocumentSettings().registerParagraphStyle(new 
RtfParagraphStyle("toc 1", "Times New Roman", 9, Font.NORMAL, 
Color.BLACK)); // Set the TOC style

Greetings,
Mark
-- 
It was all so different before everything changed.

My GPG public key is available at:
http://www.edu.uni-klu.ac.at/~mhall/data/security/MarkHall.asc

Attachment: pgpUBeNsNloao.pgp
Description: PGP signature

-------------------------------------------------------------------------
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Reply via email to