title: How to move to the next line when adding text using Apache PDFBox
body: <p>I've just started using Apache PDFBox and been experimenting with various examples I've found. </p>
  
  <p>However, I haven't been able to find an easy way to move to the next line when adding text.</p>
  
  <p>E.g.</p>
  
  <pre><code>PDPageContentStream content = new PDPageContentStream(document, page);
  PDFont font = PDType1Font.HELVETICA;
  content.beginText();
  content.setFont(font, 12);
  content.moveTextPositionByAmount(x, y);
  content.drawString("Some text.");
  content.endText();
  </code></pre>
  
  <p>To add another line of text underneath I had to repeatedly experiment with the value of y in <code>moveTextPositionByAmount</code> until it wasn't overwriting the previous line. </p>
  
  <p>Is there a more intuitive way to figure out what the coordinates of the next line are?</p>
  
  <p>TIA</p>