Thanks for all the responses.
I still don't manage how to make the same font for ALL TOCEntries ....
Like I said before: each entry have its own font type/size/whatever.
The solution using RtfParagraphStyle didn't work.
The way that I'm using entries to the TOC ... is NOT by using Chapters.
Is by using ... RtfTOCEntry, like this:
RtfTOCEntry entryGeneral = new RtfTOCEntry( "Bla bla", new Font( ) );
document.add( entryGeneral );
Please help me with that.
I really apreciate it.
On 7/17/06, Mark Hall <[EMAIL PROTECTED]> wrote:
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
-------------------------------------------------------------------------
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
--
Best Regards,
Alin
------------------------------------------------------------------------- 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
