truncated table text

19 views
Skip to first unread message

sam_h

unread,
Jun 29, 2009, 3:44:26 PM6/29/09
to Prawn
Hello

Im new to prawn and i have a small question. some cells text in my
table is being truncated when reaching the end of the cell. is there a
way or a parameter to be passed to tell my table not to do that

Thanks A million

Sam

Gregory Brown

unread,
Jun 29, 2009, 3:46:43 PM6/29/09
to prawn...@googlegroups.com

Please provide a reduced code example that reproduces the problem.

Also, is this happening in Prawn 0.4.x or the experimental 0.5 pre-release?

-greg

samer al amir

unread,
Jun 29, 2009, 3:50:33 PM6/29/09
to prawn...@googlegroups.com
          pdf.table data,
          :border_style => :underline_header,
          :position => 85,
          :align => :left,
          :overflow => :overflow


and the data is an array that am intializing using the following format

data = [[value A, Value B], [[value C, Value D]]


Am using 0.5 at the moment

Thanks for ur really fast responce

Gregory Brown

unread,
Jun 29, 2009, 4:07:09 PM6/29/09
to prawn...@googlegroups.com
On Mon, Jun 29, 2009 at 3:50 PM, samer al amir<samer....@gmail.com> wrote:
>           pdf.table data,
>           :border_style => :underline_header,
>           :position => 85,
>           :align => :left,
>           :overflow => :overflow
>
>
> and the data is an array that am intializing using the following format
>
> data = [[value A, Value B], [[value C, Value D]]

Please add:

Prawn.debug = true

at the top of your script just after the requires. Then provide me
with a complete running example.

I will not be able to reproduce the error by guessing at what your
headers / data look like.

-greg

samer al amir

unread,
Jun 29, 2009, 4:34:46 PM6/29/09
to prawn...@googlegroups.com
try this please:

          data=[["Project:", "Romerdiie Wafes Treedmelt Ptand Upqsade ald Syftom Improvements"],
          ["Addgggress of Payee:", "addressdede"]]

          pdf.table data,
          :border_style => :underline_header,
          :position => 85,
          :align => :left

"improvements" is truncated, i hope this is what you asked for

thanks again

Gregory Brown

unread,
Jun 29, 2009, 4:41:29 PM6/29/09
to prawn...@googlegroups.com
On Mon, Jun 29, 2009 at 4:34 PM, samer al amir<samer....@gmail.com> wrote:
> try this please:
>
>           data=[["Project:", "Romerdiie Wafes Treedmelt Ptand Upqsade ald
> Syftom Improvements"],
>           ["Addgggress of Payee:", "addressdede"]]
>           pdf.table data,
>           :border_style => :underline_header,
>           :position => 85,
>           :align => :left
>
> "improvements" is truncated, i hope this is what you asked for

No. I need a full script that I can run.

-greg

Andrew France

unread,
Jun 29, 2009, 4:48:08 PM6/29/09
to prawn...@googlegroups.com
samer al amir wrote:
> try this please:
>
> data=[["Project:", "Romerdiie Wafes Treedmelt Ptand Upqsade
> ald Syftom Improvements"],
> ["Addgggress of Payee:", "addressdede"]]
> pdf.table data,
> :border_style => :underline_header,
> :position => 85,
> :align => :left
>
> "improvements" is truncated, i hope this is what you asked for

The table simply going off the right edge of the page, setting the table
width option or column_widths option should resolve it.

Regards,
Andrew

samer al amir

unread,
Jun 29, 2009, 4:59:42 PM6/29/09
to prawn...@googlegroups.com
It worked thanks alot Andrew. and gregory thanks alot for your patience

Cheers guys

Gregory Brown

unread,
Jun 29, 2009, 5:11:16 PM6/29/09
to prawn...@googlegroups.com
On Mon, Jun 29, 2009 at 4:59 PM, samer al amir<samer....@gmail.com> wrote:
> It worked thanks alot Andrew. and gregory thanks alot for your patience

In the future, please make sure that unless there is a good reason why
it would not be possible,
provide a full running script so that we can more easily debug your issues.

It saves us effort, and makes it harder for us to misunderstand your problem.

-greg

samer al amir

unread,
Jun 29, 2009, 5:18:19 PM6/29/09
to prawn...@googlegroups.com
will do

thanks greg
Reply all
Reply to author
Forward
0 new messages