TCPDF不打印图像,如果html表中仅存在一行图像,则停在第二行中包含图像的图像上

问题描述

我正在尝试设置TCPDF,我有一个页面显示“客户”订单,并且添加了一个将其导出为pdf的按钮。

这是一个简单的表,所以当我将其导出到pdf时,我只会得到直到第一个我都没有得到表中的图像,并且如果输出具有2-3 ... 10表行,则只能通过第一个。

我正在使用按钮将变量“输出”通过发布传递到tcpdf_test.php。

要检查$ output是否正确填充了所有数据,我在按钮所在的页面中通过回显显示了它。

按钮->

<form action="tcpdf_test.php" method="post">
<input type="hidden" name="output" value="<?php echo $output ; ?>">
<input type="submit" name="create_pdf" class="btn btn-danger" value="Create PDF" style="margin-left:30px; border-radius:5px;" readonly/>
</form>

变量->

$output .="
        <tr>
        <td style='padding-top:15px; padding-bottom:15px; width:150px;'>".$prodname."</td>
    <td style=' width:150px;'>".$grammatoseira."</td>
    <td style=' width:150px;'>".$logo."</td>
    <td rowspan='2' style='text-align:left; padding-left:0.5%; width:200px; border: 1px solid #89c541'>".nl2br($stoixeiaektiposis)."</td>
    <td rowspan='2' width='120px' style='border-bottom: 1px solid #89c541;'>".$simiosi."</td>
    <td style='border-left: 0.5px dotted #89c541;'>".$xroma."</td>
    <td rowspan='2' style='border-left: 0.5px dotted #89c541; width:70px; border-bottom: 1px solid #89c541;'>".$tipos."</td>
    <td rowspan='2' style='border-left: 0.5px dotted #89c541; width:70px; border-bottom: 1px solid #89c541;'>".$posotita."</td>
    <td rowspan='2' height='30px' style='padding-top:25px; padding-left:1%; border-left: 0.5px dotted #89c541; border-right: 0.5px dotted #89c541; width:120px; border-bottom: 1px solid #89c541;'>".$test_sxedio."</td>
    <td rowspan='2' style='border-right: 0.5px dotted #89c541; width:70px; border-bottom: 1px solid #89c541;'>".$timi_mon."</td>
    <td rowspan='2' style='width:70px; border-bottom: 1px solid #89c541;'>".$synolo."</td>
    </tr>
    <tr style='border: 1px solid #89c541; font-weight: bold; text-align:center;'>
    <td align='center' style='padding:5px; padding-bottom:10px;  padding-top:10px; width:150px;'><img style='width:100px;'  src='/img/products/".$prodmg."' alt='".$prodmg."'></img></td>
    <td align='center' style='padding:5px; padding-bottom:10px;  padding-top:10px; width:150px;'><img style='width:100px;'  src='/img/maketes2/".$grmimg."' alt='".$grmimg."'></img></td>
    <td align='center' style='padding:5px; padding-bottom:10px;  padding-top:10px; width:150px;'><img style='width:100px;'  src='/img/maketes2/".$logoimg."' alt='".$logoimg."'></img></td>
    <td><span style='color: white; background: #89c541; border: 1px solid #89c541; font-weight: bold; font-size:10px; text-align:center; height:15px; width:100%;'>".$backlogo." </span><br><span style='font-weight: bold; text-align:center;'>".$dim."</td>
    </tr>
    ";

好吧,我发现,如果我删除了图像,则其他信息将显示在pdf中,但没有任何样式。 还能显示图像吗?

还可以显示样式吗?

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)

相关问答

错误1:Request method ‘DELETE‘ not supported 错误还原:...
错误1:启动docker镜像时报错:Error response from daemon:...
错误1:private field ‘xxx‘ is never assigned 按Alt...
报错如下,通过源不能下载,最后警告pip需升级版本 Requirem...