Can't get text to wrap in pdf::writer loose object


I’m trying to add a block of legal text in the footer of PDF file pages
using PDF::Writer.

So far I have only been able to get one long string of text that extends
off the right side of the page and doesn’t automatically wrap to the
next line. This happends when using pdf.add_text and pdf.add_text_wrap
within the pdf.open_object for example with various setting for margins
and widths.

If I use just pdf.text the text wraps as expected but since pdf.text
isn’t aware of the object it’s in the result is not optimal. I think I
might have to repeat the statement for each page to get the text to
wrap. Or I could break to text string into individual lines of the
correct number of characters and insert an add_text statement for each

Anyone able to get text to wrap in a loose object automatically?