Skip to content

Layout broken when using rowspan with repeatable footer  #133

@laurafeier

Description

@laurafeier

Reproducible with:

idx = 0
rows = 31.times.map { [{ content: (idx += 1).to_s }] }
rows.first.unshift({ content: "col 1", rowspan: rows.count })

pdf = Prawn::Document.new

pdf.bounding_box([pdf.bounds.left, pdf.cursor], width: pdf.bounds.width) do
  pdf.table(rows, cell_style: { borders: [:bottom], border_colors: 'CCCCCC' })
end

pdf.repeat(:all) do
  pdf.bounding_box([pdf.bounds.left, pdf.bounds.bottom], width: pdf.bounds.width, height: 30) do
    pdf.text("footer")
    pdf.stroke_bounds
  end
end

Ruby version: 3.0.2
Prawn version: 2.4.0
Prawn table version: 0.2.2

Result: bug.pdf

Issues:

  1. first page rows from the second columns are missing
  2. first column's bottom border should be rendered on the second page, inline with the last row, not on the first page overlapping with the footer

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions