#28 new

Strange interaction of <b> (Prawn::Format) and tables

Reported by seebs | November 25th, 2009 @ 12:04 AM

A cell containing bolded text seems to always force a new page:

!/usr/local/bin/ruby -w

require 'prawn'
require 'prawn/format'
require 'prawn/layout'
require 'prawn/table'
require 'prawn/measurement_extensions'

p = Prawn::Document.new(:margin => 0.25.in)

data = []
data << [ "a", "b" ]
data << [ "c:", "d" ]
p data.inspect
p.table data, :font_size => 8, :padding => 0, :border_width => 0, :align => :left
p.render_file "output.pdf"
%x{evince output.pdf}

This generates a two-page file, with c: starting a new page. The seems to be significant; if I remove it, that goes away. (In the real use case, I actually want to write "c: d" and have a colspan=2 -- the goal is to have bolded headers for rows of data, but to not force them into an actual separate table column.)

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