algo como esto
Código PHP:
if($image1 = "http://localhost/mi1/registros2/vistas/imagenes/"$productos2['Fotos']==0){
$pdf->Cell( 32, 18, $pdf->Image($image1.$noimagen,$pdf->GetX(), $pdf->GetY(), 32,18), 1, 1, 'L', false );
}
else
{
$pdf->Cell( 32, 18, $pdf->Image($image1.$productos2['Fotos'], $pdf->GetX(), $pdf->GetY(), 32,18), 1, 1, 'L', false );
};
Código PHP:
$productos = mysql_query("SELECT * FROM articulos WHERE Referencia LIKE '$dato%' ORDER BY VtCom DESC ");
$item = 0;
while($productos2 = mysql_fetch_array($productos))
{
$item = $item+1;
$pdf->Cell(5, 16, $item, 0);
$pdf->Cell(10, 16, $productos2['Cod_Art'], 0);
$pdf->Cell(17, 16, $productos2['Referencia'], 0);
$pdf->Cell(24, 16, $productos2['Nom_Art'], 0);
$pdf->Cell(15, 16, $productos2['Und_Vend'], 0);
$pdf->Cell(12, 16, $productos2['Stock_Total'], 0);
$pdf->Cell(14, 16, $productos2['Und_Comp'], 0);
$pdf->Cell(10, 16, $productos2['PMV'], 0);
$pdf->Cell(13, 16, $productos2['Pvta_Art'], 0);
$pdf->Cell(17, 16, $productos2['VtCom'], 0);
$pdf->Cell(17, 16, $productos2['Vtas_Imp'], 0);
$image1 = "http://localhost/mi1/registros2/vistas/imagenes/";
$pdf->Cell( 32, 18, $pdf->Image($image1.$productos2['Fotos'], $pdf->GetX(), $pdf->GetY(), 32,18), 1, 1, 'L', false );
$pdf->Ln(8);
}
$pdf->SetFont('Arial', 'B', 8);
$pdf->Cell(104,8,'',0);
$pdf->Output('reporte.pdf','D');
Gracias