
23/05/2009, 04:17
|
| | Fecha de Ingreso: abril-2009
Mensajes: 173
Antigüedad: 15 años, 11 meses Puntos: 0 | |
Respuesta: Como se pone una imagen de fondo en php fpdf Luis esto es lo que llevo.
pincha donde pone pdf 80.36.206.105/smp/PHY/CURSOBUENO.html
$pdf = new backgroundPDF('a4', 'portrait', 'image', array('img' => 'fondopdf.jpg'));
// comentado bueno de antes $pdf = new Cezpdf();
$pdf->selectFont('fonts/Helvetica.afm');
$pdf->ezSetMargins(80, 30, 50, 80);
$pdf->ezSetY(810);
$row_cargadatos = mysql_fetch_array($cargadatos);
$prueba=$row_cargadatos['num'];
$prueba1.=$row_cargadatos['codigo'];
$prueba2.=$row_cargadatos['nombre'];
$prueba3.=$row_cargadatos['descripcion'];
$prueba4.=$row_cargadatos['pvp'];
$prueba5.=$row_cargadatos['precioespecial'];
$prueba6.=$row_cargadatos['observaciones'];
$prueba7.=$row_cargadatos['fecha'];
$prueba8.=$row_cargadatos['imagenprincipal'];
$pdf->ezText($prueba1, 11,array('justification'=>'right'));
$pdf->ezText($prueba2, 11,array('justification'=>'right'));
$pdf->ezText($prueba3, 11,array('justification'=>'right'));
$pdf->ezText($prueba4, 11,array('justification'=>'right'));
$pdf->ezText($prueba5, 11,array('justification'=>'right'));
$pdf->ezText($prueba6, 11,array('justification'=>'right'));
$pdf->ezText($prueba7, 11,array('justification'=>'right'));
$pdf->ezImage($prueba8,array('justification'=>'center') );
$pdf->ezStream();
$pdf->Output();
?> |