I am trying to generate a PDF invoice using prawn with header, body and footer. The content of the body may change. I'm using bounding_box to place content in the body. If the content cannot fit on the current page body, it should automatically place the remaining content in body portion of the new page. Please help me with the coding.
我正在尝试使用带有页眉,正文和页脚的prawn生成PDF发票。身体的内容可能会改变。我正在使用bounding_box将内容放在正文中。如果内容无法适合当前页面正文,则应自动将剩余内容放在新页面的正文部分中。请帮我编码。
1 个解决方案
#1
0
Use the span()
method rather than bounding_box()
. This will allow you to set the width of your text block, but it will reflow to the top of the page when you start a new page.
使用span()方法而不是bounding_box()。这将允许您设置文本块的宽度,但在您开始新页面时它将重排到页面顶部。
#1
0
Use the span()
method rather than bounding_box()
. This will allow you to set the width of your text block, but it will reflow to the top of the page when you start a new page.
使用span()方法而不是bounding_box()。这将允许您设置文本块的宽度,但在您开始新页面时它将重排到页面顶部。