为什么使用 FPDF 和 PHP 生成的 PDF 中出现意外空格?

发布于 2024-08-06 09:03:48 字数 291 浏览 2 评论 0原文

我正在使用 FPDF 在 PDF 上写入一些文本。我正在显示 8 个不同的文本单元格。单元格正在显示,但在两个单元格之后,它将下一个单元格放到新页面上,就像我要求制作一个新的 PDF 页面一样,但我没有。我猜它以某种方式将它们推倒并将其推到下一页。我怎样才能摆脱这些烦人的空格并使其仅适合一个 PDF 页面?

我正在使用 FPDF 类 - http://fpdf.org/en/doc/index.php

I'm using FPDF to write some text on a PDF. I'm displaying 8 different cells of text. The Cells are being displayed, but after two cells, it puts the next cell onto a new page as If I had asked for a new PDF page to be made, but I did not. I'm guessing it is somehow pushing them down and pushing it onto the next page. How can I get rid of these annoying spaces and make it all fit on only the one PDF page?

I am using the FPDF Class - http://fpdf.org/en/doc/index.php

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

笨死的猪 2024-08-13 09:03:48

看看

SetAutoPageBreak(布尔自动[,浮动
边距])

描述 启用或禁用
自动分页模式。什么时候
启用,第二个参数是
距页面底部的距离
定义触发限制。经过
默认,模式打开并且边距
是2厘米。

look at

SetAutoPageBreak(boolean auto [, float
margin])

Description Enables or disables the
automatic page breaking mode. When
enabling, the second parameter is the
distance from the bottom of the page
that defines the triggering limit. By
default, the mode is on and the margin
is 2 cm.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文