Hi Mark, This does help in setting RtfTOC font, but It applies the same style to whole document. I need to have Sections BOLD and rest normal font.
Thanks Bhupat -----Original Message----- From: Mark Hall [mailto:[EMAIL PROTECTED] Sent: Sunday, July 16, 2006 8:57 AM To: Post all your questions about iText here Cc: Bhupat Raigaga; Alin Popa Subject: Re: [iText-questions] RtfTOC how to set fonts and indentation for each entry 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 ------------------------------------------------------------------------- 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
