I am trying to create the PDF using the PdfWriter.
Document document = new Document(PageSize.A4);
PdfWriter.getInstance(document, new FileOutputStream("some file path"));
document.open();
Font font1 = FontFactory.getFont(FontFactory.HELVETICA_BOLD);
font1.setSize(10);
font1.setColor(Color.BLUE);
PdfPTable table = new PdfPTable(8);
table.setWidthPercentage(100f);
table.setWidths(new int[] { 1, 1, 1, 1, 1, 1, 1, 3 });
table.setSpacingBefore(10);
table.setHorizontalAlignment(Element.ALIGN_CENTER);
PdfPCell cell1 = new PdfPCell();
//cell1.setBorder(Rectangle.NO_BORDER);
cell1.setHorizontalAlignment(Element.ALIGN_CENTER);
cell1.setBackgroundColor(Color.DARK_GRAY);
cell1.setPadding(5);
font1.setColor(Color.WHITE);
cell1.setPhrase();
table.addCell(cell1);
Why the cells are all distorted is what i dont understand

is the one fixed the issue.