tcpdf把php转换html,php - TCPDF writeHTML() - Stack Overflow

I am working on two column layout input comes from an editor which has images and text. Images can come as one column or full width. Everything works fine when I insert images in one column. But when I insert image as 2 column it fits perfectly in the column but the text after that is somewhat not aligned.

Text covers the after space correctly but when it goes to second column some space from the top till where the image ends on the first column is blank and starts after that.

if ($this->myResetColumn) {

$this->resetColumns();

$this->setEqualColumns($this->myCols, $this->myWidth);

$this->setXY($this->GetX(), $this->GetY());

$this->selectColumn();

}

$this->writeHTML($content, true, false, true, false, $align);

Second Question

It there a way, I can make few checks while the writeHTML() function is executing or I have to change the function itself, which will not be a good idea to change the source code.

For AddPage, I override it, after the line at the end like this

$this->startPage($orientation, $format, $tocpage);

if (condition) {

// some function call

}

but writeHTML() is a lengthy function to override and it will lose many options it has.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值