prawnpdf / prawn

Fast, Nimble PDF Writer for Ruby
https://prawnpdf.org
Other
4.67k stars 688 forks source link

stroke pushes everything to page 2 #896

Open sebastiaandegeus opened 9 years ago

sebastiaandegeus commented 9 years ago

When I used a stroke inside a bounding_box the content automatically moves to the next page. But it only happens for first page. Not all pages even though I used repeat :all

repeat :all do
  footer_line
end
def footer_line
    bounding_box [0, - 10], height: 50, width: bounds.right do
      stroke do
        stroke_color '7e0308'
        line_width 2
        stroke_horizontal_rule
        move_down 3
        line_width 1
        stroke_horizontal_rule
      end
    end
  end

Somehow this pushes all content the page 2. If I remove the stroke the content is back on page 1. Strangely the stroke and content show up fine on page 2 together.

packetmonkey commented 9 years ago

Can you please provide a complete script that reproduces the problem, that's a weird situation and I want to make sure I see the same thing you are.