
{filelink=10682}
/***** Code de MesExemples.com *******/
/**
* @(#)ExempleZapfDingbatsNumberLists.java
*
*
* @author
*sakoba(java.mesexemples.com) @version 1.00 2013/5/29
*/
import java.io.FileOutputStream;
import java.io.IOException;
import com.itextpdf.text.Document;
import com.itextpdf.text.DocumentException;
import com.itextpdf.text.GreekList;
import com.itextpdf.text.ListItem;
import com.itextpdf.text.RomanList;
import com.itextpdf.text.ZapfDingbatsList;
import com.itextpdf.text.ZapfDingbatsNumberList;
import com.itextpdf.text.pdf.PdfWriter;
public class ExempleZapfDingbatsNumberLists {
public static void main(String[] args) {
Document document = new Document();
try {
PdfWriter.getInstance(document,
new FileOutputStream("c:/ExempleZapfDingbatsNumberLists.pdf"));
document.open();
ZapfDingbatsNumberList z0 = new ZapfDingbatsNumberList(0, 15);
z0.add(new ListItem("premier élément"));
z0.add(new ListItem("deuxième élément"));
document.add(z0);
ZapfDingbatsNumberList z1 = new ZapfDingbatsNumberList(1, 15);
z1.add(new ListItem("premier élément"));
z1.add(new ListItem("deuxième élément"));
document.add(z1);
ZapfDingbatsNumberList z2 = new ZapfDingbatsNumberList(2, 15);
z2.add(new ListItem("premier élément"));
z2.add(new ListItem("deuxième élément"));
document.add(z2);
ZapfDingbatsNumberList z3 = new ZapfDingbatsNumberList(3, 15);
z3.add(new ListItem("premier élément"));
z3.add(new ListItem("deuxième élément"));
document.add(z3);
} catch (Exception ioe) {
System.err.println(ioe.getMessage());
}
document.close();
}
}