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

Subtable with colspan and multi-line text breaks across pages #1338

Open
tbates-redarc opened this issue Mar 4, 2024 · 0 comments
Open

Subtable with colspan and multi-line text breaks across pages #1338

tbates-redarc opened this issue Mar 4, 2024 · 0 comments

Comments

@tbates-redarc
Copy link

This is the smallest example I could produce:

require 'prawn'
require 'prawn/table'

pdf = Prawn::Document.generate("sample.pdf") do
  subtable = [
      [{content: "Colspan 2", colspan: 2}],
      ["Column 1\nLine 2", "Column 2"],
    ]

  table([[
      subtable,
    ]])
end

The second row of the subtable gets spilled onto a second page, and overlaps with any content that might be on that page. Removing the colspan or the \n makes the problem disappear.

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