我正在尝试插入图像,但不想指定 x 和 y 坐标。那可能吗?
$pdf->Image($image1, 5, 70, 33.78);
我希望能够指定大小(33.78)而不是 x 和 y,以便它根据内容移动。
$pdf->Write( 70, $reportTitle );
$pdf->Ln( 45 );
$pdf->SetFont( 'Arial', '', 12 );
$pdf->Write( 6, $reportSubtitle );
/**
Create product 1
**/
$pdf->Ln( 10 );
$pdf->SetFont( 'Arial', '', 12 );
$pdf->Write( 6, $prod1title );
$pdf->Ln( 30 );
$pdf->SetFont( 'Arial', '', 10 );
$pdf->Write( 5, $prod1sub );
$pdf->Ln( 30 );
$pdf->Image($image1, 5, 70, 33.78);
以上是我使用的代码。如果 $reportSubtitle 是两三行,它会把 $prod1title 和 $$prod1sub 往下推,而且不可避免地会在固定的图像下面。有没有办法让图像像产品标题和副标题一样被推下,同时仍然声明尺寸?