I am trying to get a checkbox instead of a "yes" and "no" in PDF once user has created a form and ready to email.
So basically what happens now is in my app I have a form with a few checkboxes and all is saved to a database. Once the I saved my form I can then send it via email in a PDF format using iText PDF. But what happens is when the PDF is generated the check boxes are displayed as either "yes" (checked) or "no" (unchecked). I would rather have a image like a checkbox that is checked or unchecked.
Here is my code:
PdfPTable table2 = new PdfPTable(3);
table2.setWidthPercentage(100);
table2.addCell(getCell("Check1: " + SaveString, PdfPCell.ALIGN_LEFT));
table2.addCell(getCell("Check2: " + SaveStringA, PdfPCell.ALIGN_CENTER));
table2.addCell(getCell("Check3: " + SaveStringB, PdfPCell.ALIGN_RIGHT));
table2.setSpacingAfter(15);
doc.add(table2);
I was looking into using a font like "Wingding" to set the yes to a checked box and no to a unchecked box.
So how can I specify this font for this?
All help will be appreciated!
Thanks
Aucun commentaire:
Enregistrer un commentaire