On Monday 17 July 2006 18:44, Bhupat Raigaga wrote: > 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. Then you need to use more styles. Use the RtfParagraphStyle.STYLE_HEADING_N styles for your chapters and sections:
Chapter ch = new Chapter(new Paragraph("Chapter 1",
RtfParagraphStyle.STYLE_HEADING_1), 1);
ch.addSection(new Paragraph("Section 1.1",
RtfParagraphStyle.STYLE_HEADING_2));
You can then use different TOC styles:
writer2.getDocumentSettings().registerParagraphStyle(new
RtfParagraphStyle("toc 1", "Times New Roman", 10, Font.NORMAL, Color.BLACK));
writer2.getDocumentSettings().registerParagraphStyle(new
RtfParagraphStyle("toc 2", "Times New Roman", 9, Font.NORMAL, Color.BLACK));
Greetings,
Mark
--
Today's weirdness is tomorrow's reason why.
-- Hunter S. Thompson
My GPG public key is available at:
http://www.edu.uni-klu.ac.at/~mhall/data/security/MarkHall.asc
pgpbOhqtS3D6O.pgp
Description: PGP signature
------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________ iText-questions mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/itext-questions
