简体   繁体   English

使用TCPDF 5.9创建HTML页脚

[英]Create HTML footer with TCPDF 5.9

I am using TCPDF 5.9.157 to create PDFs in my application and I am looking for a way to position some HTML content, namely a <table> at the bottom of the page. 我正在使用TCPDF 5.9.157在我的应用程序中创建PDF,并且我正在寻找一种方法来放置一些HTML内容,即页面底部的<table>

This is a sample of the HTML is generate in my code: 这是在我的代码中生成的HTML的示例:

    $html = "<table>";
    $html .= "<tr><td>CODES</td></tr>";
    $html .= "<tr><td>....</td></tr>";
    $html .= "</table>";

and this is the TCPDF method i'm using. 这是我正在使用的TCPDF方法。 The problem seems to be it always positions it in the top left of the page, whereas I want it to be positioned in the bottom left. 问题似乎是它总是将其放在页面的左上角,而我希望它位于页面的左下角。

    $pdf->writeHTMLCell(100, 100, 0, 0, $html, 0, 0, false, "L", true);

像这样调整传递给函数的参数似乎可以解决问题:

// $pdf is an instance of TCPDF $pdf->writeHTMLCell(0, 0, '', '', $html, 0, 0, false, "L", true);

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM