Files
MYSOPHAL/lib/tcpdf/templates/article_qr_one_product.php
2025-11-09 10:02:18 +01:00

34 lines
1.4 KiB
PHP

<?php
ob_Start();
require_once('tcpdf_include.php');
// create new PDF document
$pdf = new TCPDF('L', "mm", 'C7', true, 'UTF-8', false);
$pdf->SetMargins(2.5, 2, 2, true);
$pdf->SetPrintHeader(false);
$pdf->SetPrintFooter(false);
$pdf->AddPage();
$pdf->SetFont('helvetica', '', 4);
// $content = '<table style="border-collapse-bottom:separate; border-spacing:2px;">
// <tr>
// <th align="center" width="48" height="40" style="border-right:1px solid black; border-left:1px solid black; border-top:1px solid black; border-bottom:1px solid black;"><img src="'.$filename.'" width="48" height="40"></th>
// <th align="center" width="48" height="40" style="border-right:1px solid black; border-left:1px solid black; border-top:1px solid black; border-bottom:1px solid black;"><h3>'.$libartc.'</h3></th>
// </tr>
// </table>';
$content = '<table style="border-collapse-bottom:separate; border-spacing:2px;">
<tr>
<th align="center" width="52" height="52"><img src="'.$filename.'" width="52" height="52"></th>
<th align="left" width="52" height="52"><h3>'.$libartc.'</h3></th>
</tr>
</table>';
//$pdf->Image($filename, 10, 10, 15, 15, 'PNG', '', '', true, 150, '', false, false, 1, false, false, false);
//$pdf->SetXY(25, 10);
//$pdf->Cell(50, 15, $libartc, 1, 0, 'L', 0, '', 0, true,'C', 'C');
$pdf->writeHTML($content, true, false, false, false, '');
$pdf->Output($codeartc.'.pdf', 'I');