LwgDocument document = new LwgDocument(LwgPageSize.A4, 50, 50, 50, 50);
try {
// step 2: creation of a writer
PdfWriter writer = PdfWriter.getInstance(document, new FileOutputStream("groups.pdf"));
// step 3: we open the document
document.open();
// step 4: content
PdfContentByte cb = writer.getDirectContent();
float gap = (document.getPageSize().getWidth() - 400) / 3;
pictureBackdrop(gap, 500, cb);