P.S. P.S. - 6 months ago 13
Java Question

How add checkobox in Pdf file in itexpdf 7

How can I add a checkobox into a Pdf file like it is done in this question, but using iText 7?

I want the result to look like this:

expected result


Adapting Bruno's answer to iText 7:

Paragraph p = new Paragraph("This is a tick box character: ");
PdfFont zapfdingbats = PdfFontFactory.createFont(FontConstants.ZAPFDINGBATS);
Text chunk = new Text("4").setFont(zapfdingbats).setFontSize(14);