How do I create Roman or Greek numeral list in iText?

To create a Roman or Greek numeral list we can use special implementation list in the iText. The com.itextpdf.text.RomanList represent a Roman numeral list while the com.itextpdf.text.GreekList represent a Greek numeral list.

The list item can be created using the com.itextpdf.text.ListItem class. Let’s check out an example below:

package org.kodejava.example.itextpdf;

import com.itextpdf.text.Document;
import com.itextpdf.text.DocumentException;
import com.itextpdf.text.GreekList;
import com.itextpdf.text.List;
import com.itextpdf.text.ListItem;
import com.itextpdf.text.RomanList;
import com.itextpdf.text.pdf.PdfWriter;


public class RomanGreekListDemo {
    public static void main(String[] args) {
        Document document = new Document();
        try {
                    new FileOutputStream("RomanGreekListDemo.pdf"));

            List roman = new RomanList();
            roman.add(new ListItem("Item 1"));
            roman.add(new ListItem("Item 2"));
            roman.add(new ListItem("Item 3"));

            List greek = new GreekList();
            greek.add(new ListItem("Item 1"));
            greek.add(new ListItem("Item 2"));
            greek.add(new ListItem("Item 3"));
        } catch (DocumentException | FileNotFoundException e) {
        } finally {

Maven Dependencies

Wayan Saryada

Wayan Saryada

A programmer, runner, recreational diver, currently living in the island of Bali, Indonesia. Mostly programming in Java, creating web based application with Spring Framework, JPA, etc. If you need help on Java programming you can hire me on Fiverr.
Wayan Saryada

Leave a Reply