【发布时间】:2020-12-24 18:13:30
【问题描述】:
我试图在 HTML 表格中获取二维条码 (QR)。我得到以下代码:
$style = array(
'vpadding' => 'auto',
'hpadding' => 'auto',
'fgcolor' => array(0,0,0),
'bgcolor' => false, //array(255,255,255)
'module_width' => 1, // width of a single module in points
'module_height' => 1 // height of a single module in points
);
$pdf->write2DBarcode('http://localhost/VERP/logistics/view_warehouse.php?id='.$warehouse->wa_id.'', 'QRCODE,L', 20, 30, 50, 50, $style, 'N');
// Set some content to print
$html = <<<EOD
<table border =".5" style="line-height:20px; width:100%;">
<tr>
<td style="height:490px">test</td>
</tr>
</table>
<table border =".5" style="line-height:20px; width:100%;">
<tr>
<td style="height:490px">test</td>
</tr>
</table>
EOD;
// Print text using writeHTMLCell()
$pdf->writeHTMLCell(0, 0, '', '', $html, 0, 1, 0, true, '', true);
目标是获取html表格里面的二维码。
我尝试了来自 TCPDF 的示例 49,但我不断收到错误消息,仅将包含文件名从“tcpdf_include.php”更改为“tcpdf.php”:
“TCPPDF 错误:部分数据已经输出,无法发送 PDF 文件”
【问题讨论】: