title: How to find the end of content on the last page of pdf and insert a text block after it?
body: <p>Now we create a separate page using the addPage PDDocument method and add a block of text to it.</p>
  <p>However, I need a way to add a block of text to the last page immediately after the content. Or, if the block does not fit, then create it on a new page.</p>
  <p>As I understand it, first we need to find the end of the content. Is there a way to do it?</p>