From: Gregory Brown Date: 2009-01-25T08:09:55+09:00 Subject: Re: If you use PDF::Writer, read this post! On Sat, Jan 24, 2009 at 5:45 PM, John-Mason P. Shackelford wrote: > Greg, > > The last time I looked at Prawn (quiet a while ago) I don't remember > seeing the equivalent of add_text_wrap which became the basis for a > layout API I wrote which allowed one to define a series of text boxes > specifying x,y,width, height, and rotation angle and border and then > flow text into the first box and have it cascade through the rest. I'd > like to contribute something like this to Prawn, but it would be nice > if the fundamentals were there to support it. Did I miss the obvious > or does Prawn now support a function that allows one to flow text into > a box of specified width with the text which doesn't fit returned? I describe how to do this here: http://prawn.lighthouseapp.com/projects/9398/tickets/113-single-line-of-text But maybe instead, Prawn::Document#text_box should return the remaining parts of the string that were not rendered? Aside from returning the remainder and handling rotation, Prawn#text_box sounds exactly like what you've described here. http://is.gd/h6x9 What do you think? -greg -- Technical Blaag at: http://blog.majesticseacreature.com Non-tech stuff at: http://metametta.blogspot.com "Ruby Best Practices" Book now in O'Reilly Roughcuts: http://rubybestpractices.com