tcpdf multicell()和列中断(tcpdf multicell() and column break)

编程入门 行业动态 更新时间:2024-10-18 06:05:12
tcpdf multicell()和列中断(tcpdf multicell() and column break)

我有一个MySQL代码,人们列出了大量的信息,这可以分为两列。 我已将这些人分组到部门中,并且每个页面上都有一个部门标题。

当部门不适合同一列时,我想打破专栏并再次从顶部开始。

有没有人遇到过同样的问题? 任何帮助,将不胜感激:)

谢谢

I have a MySQL code which people list up x amount of information and this goes in two columns. I have grouped these people in departments and there is a department header for each on the page.

I would like to break the column and start from the top again when the department would not fit in the same column.

Have anyone experienced the same issue? Any help would be appreciated:)

thanks

最满意答案

我刚刚遇到同样的问题,我通过查看页面中的当前位置来处理它。 如果我知道的内容页面中的位置太低(因此会流向下一列),我会在输出之前选择下一列。 以下是我的代码示例:

if ($tcpdf->GetY() > 188) $tcpdf->selectColumn($tcpdf->getColumn() + 1); $tcpdf->writeHTMLCell(120, 3, $tcpdf->GetX(), $tcpdf->GetY(), $html, '', 1);

I just ran in to the same issue, and I dealt with it by checking my current position in the page. If the position is too low in the page for the content that I know will be there (and thus flow to the next column) I select the next column before outputting. Here is a sample of my code:

if ($tcpdf->GetY() > 188) $tcpdf->selectColumn($tcpdf->getColumn() + 1); $tcpdf->writeHTMLCell(120, 3, $tcpdf->GetX(), $tcpdf->GetY(), $html, '', 1);

更多推荐

本文发布于:2023-07-26 00:28:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1268425.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:multicell   tcpdf   break   column

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!