private float addParagraph(PDPageContentStream contentStream, float width, float sx, float sy, String text, boolean justify, float initY, float pageHeight, PDDocument document) throws IOException {
...
contentStream.endText();
contentStream.close();
contentStream = new PDPageContentStream(document,nextPage);
contentStream.beginText();
...
return (lines.size()*(7+3));
}