PDPage pg = new PDPage(PDPage.PAGE_SIZE_LETTER);
PDPageContentStream contentStream = new PDPageContentStream(doc, pg);
contentStream.beginText();
contentStream.setFont(font, fontSize);
contentStream.moveTextPositionByAmount(margin, top);
for (String line : page) {
contentStream.drawString(line);
contentStream.moveTextPositionByAmount(0, -fontSize);
}