Forum: Ruby on Rails Can't get text to wrap in pdf::writer loose object

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
9cb4de6b61b568a8c13d866ccf3b3433?d=identicon&s=25 Dan Poynor (Guest)
on 2007-01-08 02:20
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
line.

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

Thanks,
DAN
This topic is locked and can not be replied to.