插入多个图片FPDF
问题描述:
我想利用细胞放置在不同位置的图像插入多个图片FPDF
这里是我的代码部分:
$x = $pdf->GetX();
$y = $pdf->GetY();
$pdf->SetXY($x, $y);
$pdf->Cell(0, 0, $pdf->Image('../img/printing/LOGO.jpg',0,0,50,0,"","home.php"),
0, 'L'); //-->THIS PART IS WORKING
$x = 160;
$y = $y ;
$pdf->SetXY($x, $y);
$pdf->Cell(0, 0, 'asd', 0, 'L'); //-->THIS PART IS WORKING
$x = 160;
$y = $y;
$pdf->SetXY($x, $y);
$pdf->Cell(0, 0, $pdf->Image('../img/printing/LOGO.jpg',0,0,50,0,"","home.php"),
0, 'L'); //-->THIS PART IS NOT WORKING
答
所以,我必须解决这个问题$pdf->Cell(0, 0,asd $pdf>Image('../img/printing/LOGO.jpg', 0,0,50,0,"","home.php"),0,'L');
不继的当前位置细胞。所以我必须将它与当前位置相匹配。 $pdf->Cell(0, 0,asd $pdf>Image('../img/printing/LOGO.jpg', 160,0,50,0,"","home.php"),0,'L');
在以下代码的完整部分
$x = 160;
$y = $y;
$pdf->SetXY($x, $y);
$pdf->Cell(0, 0, $pdf->Image('../img/printing/LOGO.jpg',160,0,50,0,"","home.php"),
0, 'L'); //-->THIS PART IS NOT WORKING
也许你忘了'LOGOjpg'中的要点? –
@KIKOSoftware我的不好,这是发布时编辑代码时的错字。该代码仍然无法正常工作。 – Kelpie
是不是你的'$ x'和'$ y'总是一样的? '$ y = $ y'没用。 – Justinas