import java.io.FileOutputStream;
import com.lowagie.text.Document;
import com.lowagie.text.ListItem;
import com.lowagie.text.ZapfDingbatsList;
import com.lowagie.text.pdf.PdfWriter;
public class ZapfDingbatsLists {
public static void main(String[] args) {
Document document = new Document();
try {
PdfWriter.getInstance(document, new FileOutputStream("ZapfDingbatsLists.pdf"));
document.open();
ZapfDingbatsList z = new ZapfDingbatsList(42, 15);
z.add(new ListItem("first item"));
z.add(new ListItem("second item"));
for (int i = 3; i < 20; i++) {
z.add(i + "th item");
}
document.add(z);
document.newPage();
} catch (Exception ioe) {
System.err.println(ioe.getMessage());
}
document.close();
}
}
|