je finalise le paramétrage d'un document PDF généré à partir de données issues d'une base sql et tout fonctionne correctement si ce n'est que le document en question met environ une minute à être chargé !!!!
Le document est un tableau d'une quinzaine de page dont les cellules sont remplies à partir des informations issues de la base.
Quel peut-être d'après vous le problème ?
Je vous joins le code correspondant au document.
Merci d'avance à tous.
<page backtop="7mm" backbottom="7mm" backleft="10mm" backright="10mm">
<page_header>
<table style="width: 100%;">
<tr>
<td style="text-align: center; width: 100%">XXXX</td>
</tr>
</table>
</page_header>
<page_footer>
<table style="width: 100%;">
<tr>
<td style="text-align: left; width: 60%">Document à jour au moment de l'impression (<?php echo date('d/m/Y');?> <?php echo date('H:i');?>) - Seule la version en ligne fait foi</td>
<td style="text-align: right; width: 40%">Page [[page_cu]]/[[page_nb]]</td>
</tr>
</table>
</page_footer>
<?php
try
{
$bdd = new PDO('mysql:host=xxxx;dbname=xxxxxx', 'xxxx', 'xxxxx');
}
catch(Exception $e)
{
die('Erreur : '.$e->getMessage());
}
$reponse = $bdd->query('SELECT * FROM analyses ORDER BY parametre');
{
?>
<table cellspacing="0" style="width: 100%; border: solid 1px black; text-align: center; font-size: 7pt;">
<thead>
<tr>
<th style="width:10%; border: solid 0.5px black; height: 30px;">Paramètre</th>
<th style="width:5%; border: solid 0.5px black; height: 30px;">Code SIL</th>
<th style="width:10%; border: solid 0.5px black; height: 30px;">Prélèvement à privilégier</th>
<th style="width:10%; border: solid 0.5px black; height: 30px;">Prélèvement toléré</th>
<th style="width:15%; border: solid 0.5px black; height: 30px;">Préconisations</th>
<th style="width:10%; border: solid 0.5px black; height: 30px;">Conditions d'acheminement au laboratoire</th>
<th style="width:5%; border: solid 0.5px black; height: 30px;">Unités</th>
<th style="width:15%; border: solid 0.5px black; height: 30px;">Valeurs de référence</th>
<th style="width:15%; border: solid 0.5px black; height: 30px;">Stabilité après centrifugation</th>
<th style="width:5%; border: solid 0.5px black; height: 30px;">Délai de rendu</th>
</tr>
</thead>
<?php
}
while ($donnees = $reponse->fetch())
{
?>
<tr>
<td style="width:10%; border: solid 0.5px black; height: 30px;""><?php echo nl2br($donnees['parametre'])?></td>
<td style="width:5%; border: solid 0.5px black; height: 30px;""><?php echo nl2br($donnees['sil'])?></td>
<td style="width:10%; border: solid 0.5px black; height: 30px;"><?php echo nl2br($donnees['tube'])?></td>
<td style="width:10%; border: solid 0.5px black; height: 30px;""><?php echo nl2br($donnees['tube2'])?></td>
<td style="width:15%; font-size: 6pt; border: solid 0.5px black; height: 30px;"><?php echo nl2br($donnees['preconisation'])?></td>
<td style="width:10%; border: solid 0.5px black; height: 30px;"><?php echo nl2br($donnees['acheminement'])?></td>
<td style="width:5%; border: solid 0.5px black; height: 30px;"><?php echo nl2br($donnees['unites'])?></td>
<td style="width:15%; font-size: 6pt; border: solid 0.5px black; height: 30px;"><?php echo nl2br($donnees['normes'])?></td>
<td style="width:15%; border: solid 0.5px black; height: 30px;"><?php echo nl2br($donnees['conservation'])?></td>
<td style="width:5%; border: solid 0.5px black; height: 30px;"><?php echo nl2br($donnees['delai'])?></td>
</tr>
<?php
}
?>
</table>
<?php
$reponse->closeCursor();
?>
</page>