Ver Mensaje Individual
  #1 (permalink)  
Antiguo 23/03/2011, 12:28
Avatar de jacc90220
jacc90220
 
Fecha de Ingreso: agosto-2006
Mensajes: 15
Antigüedad: 17 años, 9 meses
Puntos: 0
Problemas con TCPDF

Hola,

Estoy probando el TCPDF ya que trabajaba con el fpdf, pero lei que el primero tienes mejoras sustanciales.

El tema es que realizo la siguiente consulta:

Código:
$result11=mysql_query("select * from tabla1 where codper='$codigo' order by fdocarr",$con);
$valida_filas_11=mysql_num_rows($result11);
y la muestro con:

Código:
if ($valida_filas_11!=0)
    {
    ?>
    <tr>
        <td colspan="6">&nbsp;</td>
    </tr>
     <tr>
        <td align="center"><strong>Nº</strong></td>
        <td align="center"><strong>Nº DOC</strong></td>
        <td align="center" width="100"><strong>FECHA</strong></td>
        <td align="center"><strong>CAUSA</strong></td>
        <td align="center"><strong>TIEMPO (Horas)</strong></td>
        <td align="center"><strong>AUTORIDAD</strong></td>
    </tr>

<?php
$contador=1;
  while ($row11=mysql_fetch_array($result11))
            {
             ?>
             <tr>
               <td><?php echo $contador;?></td>
               <td><?php echo $row11["ndocarr"];?></td>
               <td><?php echo $row11["fdocarr"];?></td>
               <td><?php echo $row11["causarr"];?></td>
               <td align="center"><?php echo $row11["tiemarr"];?></td>
               <td><?php echo $row11["impoarr"];?></td>
             </tr>
             <?php
             $contador++;
            }
    }
    else
    {
      ?>
      <tr>
        <td><h1>NO REGISTRA</h1></td>
      </tr>
      <?php
    }
Con esto trato de pasarlo a pdf:

Código:
$pdf->SetFont('dejavusans', '', 10, '', true);
    if ($valida_filas_11==0)
    {
        $pdf->SetFont('dejavusans', 'B', 14, '', true);
        $pdf->Cell(0,0,'NO REGISTRA',0,1,'C');
    }
    else
    {
     $pdf->SetFont('dejavusans', 'B', 12, '', true);
     $pdf->MultiCell(5,5,'No.',0,'C',0,0);
     $pdf->MultiCell(10,5,'No. DOC',0,'C',0,0);
     $pdf->MultiCell(10,5,'FECHA',0,'C',0,0);
     $pdf->MultiCell(55,5,'CAUSA',0,'C',0,0);
     $pdf->MultiCell(5,5,'TIEMPO',0,'C',0,0);
     $pdf->MultiCell(20,5,'AUTORIDAD',0,'C',0,0);

     $contador=1;
     while ($row11=mysql_fetch_array($result11))
        {
          $pdf->MultiCell(5,5,$contador,0,'C',0,0);
          $pdf->MultiCell(10,5,$row11["ndocarr"],0,'C',0,0);
          $pdf->MultiCell(10,5,$row11["fdocarr"],0,'C',0,0);
          $pdf->MultiCell(55,5,$row11["causarr"],0,'J',0,0);
          $pdf->MultiCell(5,5,$row11["tiemarr"],0,'C',0,0);
          $pdf->MultiCell(20,5,$row11["impoarr"],0,'J',0,1);
          $contador++;
        }
pero no me muestra nada. Verificando el servidor me da el siguiente error:

Maximum execution time of 30 seconds exceeded in /var/www/tcpdf/tcpdf.php.....

Ya cambié el valor en el php.ini de 30 a 120 pero sale el mismo error.

Creo q por ahi estoy haciendo una creación de celdas indefinido, por mi poco conocimiento de la sintaxis del MultiCell.

Alguna idea para ayudarme????

Saludos