【问题标题】:QR (write2DBarcode) Code on TCPDFTCPDF 上的 QR(write2DBarcode)代码
【发布时间】:2018-08-21 06:41:51
【问题描述】:

我正在尝试在同一行中创建一个包含两个不同 QR 码的 PDF,但我得到的第二个 QR 码大小不同,请检查下面的代码和图片。

        $pdf->write2DBarcode('http://xxxx.xxx.php?sc='.$linha_id_to_print->xxx, 'QRCODE,Q', 7,62,15,15, $style, 'N');
        $pdf->write2DBarcode('http://xxxx.xxx.php?sc='.$linha_id_to_print->xxx, 'QRCODE,Q', 32,62,15,15, $style, 'N');

        $pdf->SetFont('arial','',5);
        $pdf->MultiCell(19, 2, 'FIRST QR', 1, 'C',false, 0, 5, 78, true, 0, false, true, 0, 'T', false);
        $pdf->MultiCell(19, 2, 'SECOND QR', 1, 'C',false, 0, 30, 78, true, 0, false, true, 0, 'T', false);

如何解决?

谢谢

【问题讨论】:

    标签: php pdf printing qr-code tcpdf


    【解决方案1】:

    确保第二个二维码没有外推页边距。

    您可以使用以下方法修改页边距:

        $pdf->SetMargins(0,0, 0);
        $pdf->SetHeaderMargin(0);
        $pdf->SetFooterMargin(0);
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2011-04-04
      • 1970-01-01
      • 2021-09-13
      • 1970-01-01
      • 2022-07-22
      • 2018-12-10
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多