I'm using prawn for pdf generation and everything works quite well, but now I'm having a bit of a problem. When I put multiple tables on one page, they just get put over each other and not under each other. Is this normal behaviour and what can I do about it?
I add the tables on the most normal behaviour btw :)
Thanks!
What is the code you're using to create the PDF document with Prawn?
Without that, I'm guessing that you need to use 'bounding boxes' to seperate the different sections / tables in your document. Each bounding box is an area for content rendering, and new bounding boxes or text is rendered below that. See bounding_box() documentation or the example below:
> pdf.bounding_box([100,500], :width => 100, :height => 300) do
> pdf.text "This text will flow in a very narrow box starting" +
> "from [100,500]. The pointer will then be moved to [100,200]" +
> "and return to the margin_box"
> end
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With