On Monday 24 July 2006 23:21, Bhupat Raigaga wrote:
> RtfParagraphStyle head = new RtfParagraphStyle("head",
> "Bold",RtfFont.NORMAL, Color.BLACK); // Set the TOC style
> writer.getDocumentSettings().registerParagraphStyle(head);
>
> Paragraph ph = new Paragraph(sectionTitle,head);
>
> This could work for me, if I know how to associate the font size for
> RtfParagraphStyle.STYLE_HEADING_1.
> Any light on this would do me good !
I would say that the simplest way to solve this is to use the setPROPERTY_NAME
methods on the RtfParagraphStyle.STYLE_HEADING_N to set the correct values
for font name, font size, ...
The other option would be to register the RtfParagraphStyle with the correct
style name (which in the above case would be "heading 1"). I would discourage
this option since it makes no difference to the first case and is harder to
maintain (also you need to know a bit more about the internals of RTF).Greetings, Mark -- Q: What do little WASPs want to be when they grow up? A: The very best person they can possibly be. My GPG public key is available at: http://www.edu.uni-klu.ac.at/~mhall/data/security/MarkHall.asc
pgpPJ1Uy4RRol.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
