Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/281.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php 获取TCPDF html表中的二维条形码_Php_Tcpdf - Fatal编程技术网

Php 获取TCPDF html表中的二维条形码

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

我试图在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);
$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()
在输出之前