// step 3
document.open();
// step 4
PdfContentByte cb = writer.getDirectContent();
BaseFont bf = BaseFont.createFont("c:\\windows\\fonts\\times.ttf", BaseFont.IDENTITY_H, true);
LwgFont f2 = new LwgFont(bf, 24, LwgFont.NORMAL, Color.BLUE);
float llx = 100;
float lly = 100;
float urx = 500;
float ury = 800;
ColumnText ct = new ColumnText(cb);
ct.setSimpleColumn(llx, lly, urx, ury, 24, LwgElement.ALIGN_LEFT);
ct.setSpaceCharRatio(PdfWriter.NO_SPACE_CHAR_RATIO);
ct.setLeading(0, 1);
ct.setRunDirection(PdfWriter.RUN_DIRECTION_RTL);
ct.setAlignment(LwgElement.ALIGN_CENTER);
ct.addText(new Chunk(ar1, new LwgFont(bf, 16)));
ct.addText(new Chunk(ar2, new LwgFont(bf, 16, LwgFont.NORMAL, Color.red)));
ct.go();
ct.setAlignment(LwgElement.ALIGN_JUSTIFIED);
ct.addText(new Chunk(ar3, new LwgFont(bf, 12)));
ct.go();
ct.setAlignment(LwgElement.ALIGN_CENTER);
ct.addText(new Chunk(ar4, new LwgFont(bf, 14)));
ct.go();
ct.setSpaceCharRatio(PdfWriter.SPACE_CHAR_RATIO_DEFAULT);
ct.setAlignment(LwgElement.ALIGN_CENTER);
ct.addText(new Chunk("\n\n\n", new LwgFont(bf, 16)));
ct.addText(new Chunk(he1, new LwgFont(bf, 16)));
ct.addText(new Chunk(he2, new LwgFont(bf, 16, LwgFont.NORMAL, Color.red)));
ct.go();
ct.setAlignment(LwgElement.ALIGN_JUSTIFIED);
ct.addText(new Chunk(he3, new LwgFont(bf, 12)));
ct.go();
ct.setAlignment(LwgElement.ALIGN_CENTER);
ct.addText(new Chunk(he4, new LwgFont(bf, 14)));
ct.go();
document.newPage();
String atext = "\u062a\u0635\u0628\u062d ";
LwgPdfPTable table = new LwgPdfPTable(5);