innertable.addCell(new Paragraph("name:", f));
cell = new PdfPCell();
text = new TextField(writer, new Rectangle(0, 0), "name");
text.setOptions(TextField.MULTILINE);
text.setFontSize(8);
PdfFormField name = text.getTextField();
cell.setCellEvent(new StudentCardForm(name));
innertable.addCell(cell);
innertable.addCell(new Paragraph("date of birth:", f));
cell = new PdfPCell();
text = new TextField(writer, new Rectangle(0, 0), "birthday");
text.setOptions(TextField.MULTILINE);
text.setFontSize(8);
PdfFormField birthdate = text.getTextField();
cell.setCellEvent(new StudentCardForm(birthdate));
innertable.addCell(cell);
innertable.addCell(new Paragraph("Study Program:", f));
cell = new PdfPCell();
text = new TextField(writer, new Rectangle(0, 0), "studyprogram");
text.setOptions(TextField.MULTILINE);
text.setFontSize(8);
PdfFormField studyprogram = text.getTextField();
studyprogram.setFieldName("studyprogram");
cell.setCellEvent(new StudentCardForm(studyprogram));
innertable.addCell(cell);
innertable.addCell(new Paragraph("option:", f));
cell = new PdfPCell();
text = new TextField(writer, new Rectangle(0, 0), "option");
text.setOptions(TextField.MULTILINE);
text.setFontSize(8);
PdfFormField option = text.getTextField();
option.setFieldName("option");
cell.setCellEvent(new StudentCardForm(option));
innertable.addCell(cell);
outertable.addCell(innertable);
cell = new PdfPCell();
cell.setBackgroundColor(new Color(0xFF, 0xDE, 0xAD));
PdfFormField picture = PdfFormField.createPushButton(writer);
picture.setFieldName("picture");
cell.setCellEvent(new StudentCardForm(picture));
outertable.addCell(cell);
cell = new PdfPCell();
cell.setBackgroundColor(Color.WHITE);
PdfFormField barcode = PdfFormField.createPushButton(writer);
barcode.setFieldName("barcode");
cell.setCellEvent(new StudentCardForm(barcode));
outertable.addCell(cell);
outertable.writeSelectedRows(0, -1, 20, 100, writer.getDirectContent());
writer.addAnnotation(name);
writer.addAnnotation(birthdate);