... but the content stays on the first page as it should
I have a bounding_box which behaves like a table (I'm not using Table because I need to create graphics inside some cells)
bounding_box [0, cursor], width: bounds.width do
cars.each_with_index do |car, i|
cars_table_row car, i+1
Inside the cars_table_row method I have this:
start_new_page if index % 13 == 0
That makes the bounding box jump on the next page and the stroke_bounds only strokes the last page. I don't grasp how the content is shown on the front page if the bounding_box is stroked only on the second page.
If this is not a bug, is there a better way to start new pages inside a bounding_box? Or to divide a bounding box that doesn't necessarily contain text into multiple pages?
Here's a screenshot of my issue: http://cl.ly/image/1W1M3h413L2p
Same issue here, with text-only content.
You might try this:
stroke_bounds && start_new_page if index % 13 == 0
I would be curious to know if that gets you anywhere.
Yes that works. Thanks!