We will create PdfPTable (com.itextpdf.text.pdf.PdfPTable) and then create cells ( com.itextpdf.text.pdf.PdfPCell) and then use setBackgroundColor to set the Cell Background Colour In Pdf generated Table in java in pdf in itext in java.

We will create top level PdfPTable (com.itextpdf.text.pdf.PdfPTable) and then create top level table cells ( com.itextpdf.text.pdf.PdfPCell) and then create another table i.e. nested table and add that in top level table cells in java in pdf in itext in java.

First create List (com.itextpdf.text.List) i.e. orderedList using (new List(true); Or new List(List.ORDERED);) and then add ListItems (com.itextpdf.text.ListItem) in orderedList using add method of List (orderedList.add(new ListItem("Item 1"))).

First create List (com.itextpdf.text.List) i.e. using (new List(true); Or new List(List.ORDERED);) you may make it unordered list as well depending on your requirement and before adding sublist in list add ListItems which will act as heading for sublist and then create and add sublist i.e. unordered list (again you may create sublist as ordered or unordered depending on your requirement) but remember to give pass second argument of List while defining sublist like (sublist = new List(List.UNORDERED, 20)), second argument passed as 20 here is space between between bullet and ListItem added in sublist.

Program/Example How to Create List And SubList In Pdf in java - Using iText library - core java tutorial