// Create a new workbook Workbook workbook = new Workbook(); IWorksheet worksheet = workbook.getWorksheets().get(0); CheckBoxCellType cellType = new CheckBoxCellType(); cellType.setCaption("Caption"); cellType.setTextTrue("sample1"); cellType.setTextFalse("sample1"); cellType.setTextIndeterminate("sample1"); cellType.setIsThreeState(true); cellType.setTextAlign(CheckBoxAlign.Right); CheckBoxCellType cellType2 = new CheckBoxCellType(); cellType2.setCaption("Caption"); cellType2.setTextTrue("sample2"); cellType2.setTextFalse("sample2"); cellType2.setTextIndeterminate("sample2"); cellType2.setIsThreeState(true); cellType2.setTextAlign(CheckBoxAlign.Right); cellType2.setBoxSize(15); CheckBoxCellType cellType3 = new CheckBoxCellType(); cellType3.setCaption("Caption"); cellType3.setTextTrue("sample3"); cellType3.setTextFalse("sample3"); cellType3.setTextIndeterminate("sample3"); cellType3.setIsThreeState(true); cellType3.setTextAlign(CheckBoxAlign.Right); cellType3.setBoxSize(18); worksheet.getRange("A1").setCellType(cellType); worksheet.getRange("A2").setCellType(cellType2); worksheet.getRange("A3").setCellType(cellType3); worksheet.getRange("A1:A3").setValue(false); worksheet.getRange("1:3").getEntireRow().setRowHeight(20); worksheet.getRange("A:A").setColumnWidth(15); worksheet.getRange("A:A").setHorizontalAlignment(HorizontalAlignment.Center); // Save to a pdf file workbook.save("SizeOfCheckBox.pdf");