LwgFont font = FontFactory.getFont(FontFactory.HELVETICA, 14, LwgFont.BOLD, Color.BLUE);
Paragraph p = new Paragraph("Ghent University", font);
p.setAlignment(LwgElement.ALIGN_CENTER);
document.add(p);
LwgFont f = FontFactory.getFont(FontFactory.HELVETICA, 8);
LwgPdfPTable outertable = new LwgPdfPTable(3);
outertable.setTotalWidth(200);
outertable.getDefaultCell().setBorder(LwgRectangle.NO_BORDER);
float[] outer = { 60, 25, 15 };
outertable.setWidths(outer);
LwgPdfPTable innertable = new LwgPdfPTable(2);
float[] inner = {35, 65};
innertable.setWidths(inner);
LwgPdfPCell cell;
TextField text;
innertable.add(new Paragraph("name:", f));
cell = new LwgPdfPCell();
text = new TextField(writer, new LwgRectangle(0, 0), "name");
text.setOptions(TextField.MULTILINE);
text.setFontSize(8);
PdfFormField name = text.getTextField();
cell.setCellEvent(new StudentCardForm(name));
innertable.add(cell);
innertable.add(new Paragraph("date of birth:", f));
cell = new LwgPdfPCell();
text = new TextField(writer, new LwgRectangle(0, 0), "birthday");
text.setOptions(TextField.MULTILINE);
text.setFontSize(8);
PdfFormField birthdate = text.getTextField();
cell.setCellEvent(new StudentCardForm(birthdate));
innertable.add(cell);
innertable.add(new Paragraph("Study Program:", f));
cell = new LwgPdfPCell();
text = new TextField(writer, new LwgRectangle(0, 0), "studyprogram");
text.setOptions(TextField.MULTILINE);
text.setFontSize(8);
PdfFormField studyprogram = text.getTextField();
studyprogram.setFieldName("studyprogram");
cell.setCellEvent(new StudentCardForm(studyprogram));
innertable.add(cell);
innertable.add(new Paragraph("option:", f));
cell = new LwgPdfPCell();
text = new TextField(writer, new LwgRectangle(0, 0), "option");
text.setOptions(TextField.MULTILINE);
text.setFontSize(8);
PdfFormField option = text.getTextField();
option.setFieldName("option");
cell.setCellEvent(new StudentCardForm(option));
innertable.add(cell);
outertable.add(innertable);
cell = new LwgPdfPCell();
cell.setBackgroundColor(new Color(0xFF, 0xDE, 0xAD));
PdfFormField picture = PdfFormField.createPushButton(writer);
picture.setFieldName("picture");