Hi Bhupat,

I have also the same problem: I can't setup the font for every entry of TOC. Even if I specify one font, the font it will be ... random or ... generated as the one from the page where the Entry was used.
Soi, guys, please help us, what can be the problem, how can we solve this ?
This can be a huge bug.

Thanks Bhupat and thanks guys for your answer.

Alin.


On 7/14/06, Bhupat Raigaga <[EMAIL PROTECTED]> wrote:

Hi,

 

I am using itext for Rtf generation and it works pretty good for my 90% needs.

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 ?

Code:

 

I have main table of entry as :

          tocTitle.add(new RtfTableOfContents("Table of Contents", f));

                   iTextDoc.add(tocTitle);

 

Adding TOC entry:

Font f =  FontFactory.getFont(FontFactory.TIMES_BOLD, 12f);

               com.lowagie.text.rtf.field.RtfTOCEntry TOCEntry =

new com.lowagie.text.rtf.field.RtfTOCEntry(sectionTitle, f);

               TOCEntry.setFont(f);

               iTextDoc.add(rtfTOC);

 

I also tried this,

 

Paragraph tocPar = new Paragraph();//("Table of Contents", f);

                tocPar.setAlignment(Paragraph.ALIGN_CENTER);

                tocPar.add(TOCEntry);

                tocPar.setIndentationRight(5);

                tocPar.setExtraParagraphSpace(5f);

                iTextDoc.add(tocPar);

 

 



-------------------------------------------------------------------------
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





--
Best Regards,

Alin
-------------------------------------------------------------------------
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