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.
There some package used in the program for the purpose. These are as follows:
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)
This method is used to set the starting value of unordered list.
The code of the program is given below:
The output of the program is given below:
If you enjoyed this post then why not add us on Google+? Add us to your Circles
Liked it! Share this Tutorial
Discuss: Creating Multiple Lists
Post your Comment