GreekLists Example : GreekLists « PDF RTF « Java






GreekLists Example

GreekLists Example

import java.io.FileOutputStream;

import com.lowagie.text.Document;
import com.lowagie.text.GreekList;
import com.lowagie.text.ListItem;
import com.lowagie.text.pdf.PdfWriter;
//Greek letter list
public class GreekListsPDF {
  public static void main(String[] args) {
    Document document = new Document();
    try {
      PdfWriter.getInstance(document, new FileOutputStream("GreekListsPDF.pdf"));
      document.open();

      GreekList greek = new GreekList(15);
      greek.setGreekLower(true);
      greek.add(new ListItem("first item"));
      greek.add(new ListItem("second item"));
      for (int i = 3; i < 20; i++) {
        greek.add(i + "th item");
      }
      document.add(greek);
    } catch (Exception ioe) {
      System.err.println(ioe.getMessage());
    }
    document.close();
  }
}
           
       








itext.zip( 1,748 k)

Related examples in the same category