I know I'm late, but I just stumbled upon the same issue. I'm using OpenPDF-1.3.33, and by default cell's element is aligned to the left.
You need to make
p.setAlignment(Element.ALIGN_CENTER); // not Element.ALIGN_MIDDLE