// step 3: we open the document
document.open();
// step 4: we add content to the document
LwgFont font0 = FontFactory.getFont(BaseFont.HELVETICA, BaseFont.WINANSI, 12);
String text0 = "This is the quite popular built in font '" + BaseFont.HELVETICA + "'.";
document.add(new Paragraph(text0, font0));
LwgFont font1 = FontFactory.getFont("ComicSansMS", BaseFont.WINANSI, 12);
String text1 = "This is the quite popular True Type font 'ComicSansMS'.";
document.add(new Paragraph(text1, font1));
LwgFont font2 = FontFactory.getFont("ComicSansMS-Bold", BaseFont.WINANSI, 12);
String text2 = "This is the quite popular True Type font 'ComicSansMS-Bold'.";
document.add(new Paragraph(text2, font2));
LwgFont font3= FontFactory.getFont("MS-PGothic", BaseFont.IDENTITY_H, BaseFont.EMBEDDED, 12);
String text3 = "\u5951\u7d04\u8005\u4f4f\u6240\u30e9\u30a4\u30f3\uff11";
document.add(new Paragraph(text3, font3));
BufferedWriter out = new BufferedWriter(new FileWriter("registered.txt"));
out.write("These fonts were registered at the FontFactory:\r\n");
for (Iterator i = FontFactory.getRegisteredFonts().iterator(); i.hasNext(); ) {