#33 new
Grant Sayer

Table Layout with Large amount of data causes hang

Reported by Grant Sayer | January 14th, 2010 @ 05:09 AM

I'm trying to create a table with a number of rows, one of which has a long text string. When making a call to render the table it simply hangs. I've created the test case below:

What happens if that in the 'bad_data' array , if the characters are one less it works ok, otherwise any more characters and it fails to render or complete.

require 'prawn/core'
require 'prawn/layout'

Prawn::Document.generate("/tmp/example.pdf", :page_size => 'A4', :layout => :potrait) do |pdf|

data = [["a", "b"]] big_data = [["0","0123467890123467890123467890123467890123467890123467890123456789"]] bad_data = [["0","0123467890123467890123467890123467890123467890123467890123456789ABCDEFGHIJK"]]

#simple test small data - works ok pdf.table(data)

#slightly more data - nearly to margin edge of page pdf.table(big_data)

#ain't goin' work - gets stuck with layout of text in cell pdf.table(bad_data)


No comments found

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

People watching this ticket