Hi all,

I am working on a Java application. I want to develope Microsoft Word document using iText API..

The requirement is generating multilevel bulleted text document. But the problem is third level bullet. I am not getting any error, when I run the following program, But when I open the word document, 3rd level bullet is not getting displayed. Any one knew, how to solve the following problem, please I am requesting you to kindly send me the code.

 Here I enclosed the Microsoft word file, I had generated with the help of following code.

Bulleted Text :
                 
                Document document = new Document();
            RtfWriter2.getInstance(document, new FileOutputStream("c:\\temp\\MultilevelBullet.rtf"));
            document.open();
            List  list= new List(false, 20);
            list.add(new ListItem(new Paragraph("Fruits", new Font(20))));
            List innerList1 = new List(false, 20);
            innerList1.add(new ListItem(new Paragraph("Apple", new Font(20))));
                List innerList2 = new List(false, 20);
                innerList2.add(new ListItem(new Paragraph("Mango", new Font(20))));
                innerList1.add(innerList2);
                innerList1.add(new ListItem(new Paragraph("Grape", new Font(20))));
              list.add(innerList1);
                  document.add(list);
              document.close();

Bulleted Number Text:

                Document document = new Document();
            RtfWriter2.getInstance(document, new FileOutputStream("c:\\temp\\MultilevelBullet.rtf"));
            document.open();
            List  list= new List(true, 20);
            list.add(new ListItem(new Paragraph("Numbers", new Font(20))));
            List innerList1 = new List(true, 20);
            innerList1.add(new ListItem(new Paragraph("One", new Font(20))));
                List innerList2 = new List(true, 20);
                innerList2.add(new ListItem(new Paragraph("Two", new Font(20))));
                innerList1.add(innerList2);
                innerList1.add(new ListItem(new Paragraph("Three", new Font(20))));
              list.add(innerList1);
                  document.add(list);
              document.close();


                                                                                                         

Any help is highly appreciated. Thanx in advance


With regards
chandru

______________________________________________________________________

Attachment: Bulleted_Number_Sample.rtf
Description: RTF file

Attachment: Bulleted_Sample.rtf
Description: RTF file

Reply via email to