Determining multi-line text height, few more questions

9 views
Skip to first unread message

atotic

unread,
Nov 6, 2009, 7:32:17 PM11/6/09
to Prawn
Hi,
I am doing a voting ballot layout project, and would prefer to use
Prawn. I started off with a pdflib. Coding in a mixed C/Postscript
style in Ruby is a mindwarp. Prawn has potential, and our release
schedules line up.

I've had some trouble finding docs for a few things I need to do:

1) How do you measure height of a multi-line text string? I am doing
programatic page layout, and need to know heights of multi-line
strings for a given width.

2) Can you go back and draw on older pages in a document. This would
come in handy for generating "page 1/5" type information.

If this stuff is not there, I am not shy at implementing it, would
love to get some hints about implementation.

Thanks,

Aleks

Gregory Brown

unread,
Nov 6, 2009, 7:43:19 PM11/6/09
to Prawn


On Nov 6, 7:32 pm, atotic <ato...@gmail.com> wrote:
> Hi,
> I am doing a voting ballot layout project, and would prefer to use
> Prawn. I started off with a pdflib. Coding in a mixed C/Postscript
> style in Ruby is a mindwarp. Prawn has potential, and our release
> schedules line up.
>
> I've had some trouble finding docs for a few things I need to do:
>
> 1) How do you measure height of a multi-line text string? I am doing
> programatic page layout, and need to know heights of multi-line
> strings for a given width.

Should be able to use height_of()

> 2) Can you go back and draw on older pages in a document. This would
> come in handy for generating "page 1/5" type information.

You'll be able to do this in a minimal fashion in 0.6, which I'll
release Sunday.
All of the underlying mechanics are there, we just need to flesh out
the details.
Reply all
Reply to author
Forward
0 new messages