Foros del Web » Programando para Internet » PHP »

Duda con EZPDF

Estas en el tema de Duda con EZPDF en el foro de PHP en Foros del Web. que tal amigos!! tengo una duda lo que sucede esque ya tengo hechas tres consultas todas ellas guardadas en variables diferentes y me muestra bien ...
  #1 (permalink)  
Antiguo 28/02/2011, 14:27
 
Fecha de Ingreso: febrero-2011
Mensajes: 3
Antigüedad: 13 años, 1 mes
Puntos: 0
Duda con EZPDF

que tal amigos!!

tengo una duda lo que sucede esque ya tengo hechas tres consultas todas ellas guardadas en variables diferentes y me muestra bien el archivo generado pdf.

Mi problema radica cuando quiero hacer o copiar los resultados a una parte inferior del documento pdf.

es decir quiero imprimir dos registros iguales para cortar la hoja, darle un pedazo al cliente y yo me quedo con el otro, pero cuando quiero hacer otra consulta y guardarla en otra variable me saca el erro. aqui dejo el codigo completo saludos y gracias por la atencion.

<?php
require_once('class.ezpdf.php');
$pdf =& new Cezpdf('a4');
$pdf->selectFont('/fonts/courier.afm');
$pdf->ezSetCmMargins(1,1,1.5,1.5);

$id_mat=$_REQUEST['id_mat'];

include('conexion.php');
$consulta3 = "SELECT id_mat, apaterno_el, amaterno_el, nombre_el, email_el FROM matrimonio WHERE id_mat = '$id_mat'";
$resultado3= mysql_query($consulta3);
$totEmp3 = mysql_num_rows($resultado3);

$ixx3 = 0;
while($datatmp3 = mysql_fetch_assoc($resultado3)) {
$ixx3 = $ixx3+1;
$data3[] = array_merge($datatmp3, array('num'=>$ixx3));
}
$titles3 = array(
'id_mat'=>'<b>Registro</b>',
'apaterno_el'=>'<b>Apellido Paterno El</b>',
'amaterno_el'=>'<b>Apellido Materno El</b>',
'nombre_el'=>'<b>Nombre El</b>',
'email_el'=>'<b>Correo Electronico El</b>',

);
$options3 = array(
'shadeCol'=>array(0.9,0.9,0.9),
'xOrientation'=>'center',
'width'=>500
);
$txttit3 = "<b>http://www.carreraporlaeucaristia.com</b>\n";
$txttit3.= "DATOS REGISTRADOS DE MATRIMONIOS POR NUMERO DE REGISTRO \n\n";
$txttit3.= "DATOS DEL ESPOSO \n";

$pdf->ezText($txttit3, 12);
$pdf->ezTable($data3, $titles3, '', $options3);
$pdf->ezText("\n\n\n", 5);
$pdf->ezStream();
?>

<?php // ELLA ?>
<?php
include('conexion.php');
$consulta2 = "SELECT id_mat, apaterno_ella, amaterno_ella, nombre_ella, email_ella FROM matrimonio WHERE id_mat = '$id_mat' ";
$resultado2= mysql_query($consulta2);
$totEmp2 = mysql_num_rows($resultado2);

$ixx2 = 0;
while($datatmp2 = mysql_fetch_assoc($resultado2)) {
$ixx2 = $ixx2+1;
$data2[] = array_merge($datatmp2, array('num'=>$ixx2));
}
$titles2 = array(
'id_mat'=>'<b>Registro</b>',
'apaterno_ella'=>'<b>Apellido Paterno Ella</b>',
'amaterno_ella'=>'<b>Apellido Materno Ella</b>',
'nombre_ella'=>'<b>Nombre Ella</b>',
'email_ella'=>'<b>Correo Electronico Ella</b>',

);
$options2 = array(
'shadeCol'=>array(0.9,0.9,0.9),
'xOrientation'=>'center',
'width'=>500
);
$txttit2 = "<b>DATOS DE LA ESPOSA</b>\n";


$pdf->ezText($txttit2, 12);
$pdf->ezTable($data2, $titles2, '', $options2);
$pdf->ezText("\n\n\n", 5);
$pdf->ezStream();
?>

<?PHP

// DATOS DE LA CARRERA DE MATRIMONI0S
include('conexion.php');
$consulta1 = "SELECT id_mat, mcategoria, mcarrera, mclub FROM matrimonio WHERE id_mat = '$id_mat' ";
$resultado1= mysql_query($consulta1);
$totEmp1 = mysql_num_rows($resultado1);

$ixx1 = 0;
while($datatmp1 = mysql_fetch_assoc($resultado1)) {
$ixx1 = $ixx1+1;
$data1[] = array_merge($datatmp1, array('num'=>$ixx1));
}
$titles1 = array(
'id_mat'=>'<b>Registro</b>',
'mcategoria'=>'<b>Categoria</b>',
'mcarrera'=>'<b>Carrera</b>',
'mclub'=>'<b>Club</b>',

);
$options1 = array(
'shadeCol'=>array(0.9,0.9,0.9),
'xOrientation'=>'center',
'width'=>500
);
$txttit1 = "<b>DATOS DE LA CARRERA, CATEGORIA Y CLUB INSCRITOS</b>\n";

$pdf->ezText($txttit1, 12);
$pdf->ezTable($data1, $titles1, '', $options1);
$pdf->ezText("\n\n\n\n", 5);
$pdf->ezText("<b>Registro: ___________________________ Recibi: ___________________________", 10);
$pdf->ezText("\n\n\n\n", 5);
$pdf->ezText("<b>Fecha:</b> ".date("d/m/Y"), 10);
$pdf->ezText("\n\n", 5);
$pdf->ezText("<b>_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _", 10);
$pdf->ezStream();
?>

// aca abajo quiero imprimir exactamente lo de arriba, creo las variables pero me saca error.
  #2 (permalink)  
Antiguo 28/02/2011, 14:43
Avatar de GatorV
$this->role('moderador');
 
Fecha de Ingreso: mayo-2006
Ubicación: /home/ams/
Mensajes: 38.567
Antigüedad: 17 años, 10 meses
Puntos: 2135
Tema movido desde Configuración PHP a PHP

Etiquetas: ezpdf
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 09:35.