Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Layout broken when using rowspan with repeatable footer #133

Open
laurafeier opened this issue Jan 13, 2022 · 0 comments
Open

Layout broken when using rowspan with repeatable footer #133

laurafeier opened this issue Jan 13, 2022 · 0 comments

Comments

@laurafeier
Copy link

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant