Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在尝试使用带有页眉、正文和页脚的虾生成 PDF 发票。正文的内容可能会发生变化。我正在使用 bounding_box 将内容放置在正文中。如果内容不能适合当前页面正文,它应该自动将剩余内容放在新页面的正文部分。请帮我编码。
使用span()方法而不是bounding_box(). 这将允许您设置文本块的宽度,但当您开始新页面时,它将重新排列到页面顶部。
span()
bounding_box()