Php 获取TCPDF html表中的二维条形码
我试图在HTML表格中获得二维条形码(QR)。我得到了以下代码:Php 获取TCPDF html表中的二维条形码,php,tcpdf,Php,Tcpdf,我试图在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
$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);
$style=array(
'vpadding'=>'auto',
'hpadding'=>'auto',
'fgcolor'=>数组(0,0,0),
'bgcolor'=>false,//数组(255255)
'module_width'=>1,//单个模块的宽度(以点为单位)
“模块高度”=>1//单个模块的高度(以点为单位)
);
$pdf->write2DBarcode('http://localhost/VERP/logistics/view_warehouse.php?id=“.$warehouse->wa_id.”,“QRCODE,L',20,30,50,50,$style,'N');
//设置一些要打印的内容
$html=找到了答案。我在寻找错误的东西。答复:
使用TCPDF中的示例49并添加
ob_end_clean()代码>
在输出之前