In this program we are going to tell you how you
can make lists into a pdf files. You can make lists and also make
sublist You can make
ordered list or symbolic list. iText API,s provides facility to make
list. List may be ordered or list may be unordered. Depending on our
requirement we can create both types of list. We can add a symbols as
list.
Code Description:
There some package used in the program for the purpose. These are as follows:
List:
List class is used to create the object of
the list. In List constructor we can pass two arguments List(boolean
value,sizeOfList).If Boolean value is true then the list is
ordered. If we want to make unsolder list or we want to add a symbol
then the Boolean value must be false.
ListItem: ListItem class is used to add the items.
setListSymbol(): This method is used to set the symbol for list. We can pass two arguments with in setListsymbol() method.The deatails are:
1.public void setListSymbol(Chunk symbol)
setListSymbol(Chunk symbol).setFirst(Char c):
This method is used to set
the starting value of unordered list. The code of the program is given below:
import java.io.FileOutputStream;
|
The output of the program is given below:

If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.
Ask Questions? Discuss: Creating Multiple Lists
Post your Comment