if the pdf contains large dynamic text how to preserve formatting

4 views
Skip to first unread message

sk

unread,
Jun 27, 2009, 5:00:37 AM6/27/09
to Prawn
Hi
I have to create a pdf document like below

CONTACT (#this is a subheading)

Name sk
Address addressline1
addressline2
addressline3


COMPANY (#this is subheading)

Url www.example.com
phone 12345


And I tried like

pdf.bounding_box([50,700], :width => 400) do
pdf.font_size(11) do
pdf.text 'CONTACT',:style => :bold ,:align => :left,:font =>
"Arial"
end
end
pdf.bounding_box([50,680], :width => 100) do
pdf.text "Name",:style => :bold,:size => 11, :font => "Arial"
end

etc...........

But is there an easyway to do this Why am asking is in the above
for example Address it covers 3 lines And I have also some dynamic
text like this So if it gets larger all my specified positions to
place the above texts gone and lose formatting Please tell me how can
I do the above Also since I am new to prawn please tell about any
tutorials or some good links on the usage of prawn

Thanks
sk

sk

unread,
Jun 27, 2009, 5:27:39 AM6/27/09
to Prawn
Hi
And onother thing is texts Name, Address on left side are bold
Reply all
Reply to author
Forward
0 new messages