开发者

Set cell borders as dashed in tcpdf WriteHTML

Hi i want to make the border of table cells as dashed lines in TCPDF writehtml()... I have tried using border=1 for tables but only a thick border comes .. also i have tried using css like style="border-style: dashed;border-width: 1px; " however the bo开发者_高级运维rder remains the same... Can anyone point me in the right direction?


According to the docs, if you’d use writeHTMLCell(), the 6th argument represents the border style. A dashed border would look like:

TCPDF::writeHTMLCell(
    …,
    array(
        'LRTB' => array(
            'width' => 1, // careful, this is not px but the unit you declared
            'dash'  => 1,
            'color' => array(0, 0, 0)
        )
    ),
    …
);

This example (demo) helped me a lot creating tables in PHP with MultiCell() instead of HTML.


style="border:1px dashed;" This is working for me ....

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜