Create Greek List In pdf in java using iText


In this core java tutorial we will learn how to Create Greek List In pdf in java using iText library - core java tutorial with program and examples.

First create GreekList (com.itextpdf.text.GreekList) and then add ListItems (com.itextpdf.text.ListItem) in GreekList using add method of GreekList (greekList.add(new ListItem("Item 1"))).

We will generate PDF files in java using iText library. PDF files can be generated dynamically in java using iText library.

Also read :

How to Create Roman List In pdf in java - iText java tutorial

Create ZapfDingbats List In pdf in java - iText java tutorial program

How to Create Ordered List In pdf in java using iText - iText java tutorial

Creating the UnOrdered List In pdf in java - iText java tutorial example

How to Create Lists And SubLists In Pdf in java - iText java tutorial






Download jars required to execute program >

Or, you may download jars from here.

Program/Example how to Create Greek List In pdf in java  - Using iText library - core java tutorial

import java.io.File;
import java.io.FileOutputStream;
import java.io.OutputStream;
import com.itextpdf.text.Document;
import com.itextpdf.text.ListItem;
import com.itextpdf.text.Paragraph;
import com.itextpdf.text.GreekList;
import com.itextpdf.text.pdf.PdfWriter;
/**
*
*  How to Create Greek List In Pdf Example -
*  Using iText library - core java tutorial
*
*/
public class CreateGreekListInPdfExample {
   public static void main(String[] args) {
          try {
                 String pdfFilePath = "E:/Create Greek List In Pdf Example.pdf";
                 OutputStream fos = new FileOutputStream(new File(pdfFilePath));
                 Document document = new Document();
                 PdfWriter.getInstance(document, fos);
                 document.open();
                 document.add(new Paragraph("This is GreekList"));
                 // Create GREEK list - in PDF using iText library in java
                 GreekList greekList = new GreekList();
                 // Add items in GREEK list - in PDF using iText library in java
                 greekList.add(new ListItem("Item 1"));
                 greekList.add(new ListItem("Item 2"));
                 greekList.add(new ListItem("Item 3"));
                 greekList.add(new ListItem("Item 4"));
                 greekList.add(new ListItem("Item 5"));
                 greekList.add(new ListItem("Item 6"));
                 greekList.add(new ListItem("Item 7"));
                 greekList.add(new ListItem("Item 8"));
                 greekList.add(new ListItem("Item 9"));
                 greekList.add(new ListItem("Item 10"));

                 document.add(greekList);
                 document.close();
                 fos.close();
                 System.out.println("PDF created in >> " + pdfFilePath);
          } catch (Exception e) {
                 e.printStackTrace();
          }
   }
}
/* OUTPUT of above program/Example -
PDF created in >> E:/Create Greek List In Pdf Example.pdf
*/


PDF formed after executing above java program(Create Greek List In pdf in java using iText) will look like this >

Summary -
So in this core java tutorial we Created Greek List In pdf in java using iText library - core java tutorial with program and examples.
We first created GreekList (com.itextpdf.text.GreekList) and then added ListItems (com.itextpdf.text.ListItem) in GreekList using add method of GreekList (greekList.add(new ListItem("Item 1"))).



Having any doubt? or you you liked the tutorial! Please comment in below section.
Please express your love by liking JavaMadeSoEasy.com (JMSE) on facebook, following on google+ or Twitter.

References >



RELATED LINKS>

iText library tutorial in java - How to Create and work with PDF files in java


Creating first pdf and setting attributes using itext in java - iText tutorial >

Create the first Pdf Example Using iText library in java - iText java tutorial example

Setting Pdf Attributes like Title, Author, Creator, subject, Keywords, Header and CreationDate in java



Creating TABLES in pdf in java - iText tutorial >

How to Create the Table In Pdf in java - iText java tutorial

How to Create Images In Pdf generated Table in java itext

How to Create Nested Tables in Pdf in java - iText java tutorial

How to Create the Table With Multiple Rows In Pdf in java program


Creating PASSWORD PROTECTED PDF in java - iText tutorial >

How to Create Password Protected Pdf in java - iText Example



Creating IMAGES in pdf in java - iText tutorial >

Adding the Images In Pdf in java example using iText - iText java tutorial

How to Add And Rotate Images In Pdf in java - iText java tutorial example

How can you Add the Images from URL In Pdf in java program





Adding WATERMARK in pdf in java - iText tutorial >

How to add TEXT as Watermark In Pdf in java - iText java tutorial

How to add IMAGE as Watermark In Pdf in iText in java example



Creating CHAPTER, SECTION, CHUNK, PARAGRAPH AND PHRASE in pdf in java - iText tutorial >

Create Chapter And Section In Pdf in java - iText java tutorial

Create Chunk In Pdf in java - iText java tutorial program

how to Create Paragraph In Pdf - iText java tutorial program

Create Left, center and right aligned Paragraph In Pdf - iText java tutorial

Create Phrase In Pdf (with lead) Using Itext - iText java tutorial example



eEdit
Must read for you :