views:

265

answers:

1

Is there a way to justify text in pdf.text_box using the prawn plugin?

A: 

Here is where the documentation for text_box is: Class::Prawn::Document

The text box is like most other prawn functions and takes the data and then the options.

#text_box(text,options)

pdf.text "Here is some text for this text entry", :size => 16, :align => :left

Using the :align option is what I think you need.

The Rails Cast did an episode on Prawn that may also be useful. Check that out here.

lillq