1

Bonjour,


Tout d'abord, merci d'avoir réalisé ce script bien sympathique et surtout très pratique !


J'ai actuellement un problème de rendu.

Mon code HTML me donne ça :
[URL=http://img90.imageshack.us/my.php?image=avantyb6.gif][IMG]http://img90.imageshack.us/img90/4874/avantyb6.th.gif[/IMG][/URL]

Alors que le fichier PDF généré à partir de ce code donne ça :
[URL=http://img132.imageshack.us/my.php?image=apreses7.gif][IMG]http://img132.imageshack.us/img132/9208/apreses7.th.gif[/IMG][/URL]

Tout est décalé, les images ne sont pas correctement à leur place.
Je ne vois pas d'où peut venir le problème.

Source de mon code :
<table width="900" border="0" cellpadding="0" cellspacing="0" align="center">
<tr>
<td>
<img src="images/une_espaceur.gif" width="8" height="1"></td>
<td>
<img src="images/une_espaceur.gif" width="1" height="1"></td>
<td>
<img src="images/une_espaceur.gif" width="217" height="1"></td>
<td>
<img src="images/une_espaceur.gif" width="1" height="1"></td>
<td>
<img src="images/une_espaceur.gif" width="13" height="1"></td>
<td>
<img src="images/une_espaceur.gif" width="14" height="1"></td>
<td>
<img src="images/une_espaceur.gif" width="2" height="1"></td>
<td>
<img src="images/une_espaceur.gif" width="328" height="1"></td>
<td>
<img src="images/une_espaceur.gif" width="21" height="1"></td>
<td>
<img src="images/une_espaceur.gif" width="238" height="1"></td>
<td>
<img src="images/une_espaceur.gif" width="44" height="1"></td>
<td>
<img src="images/une_espaceur.gif" width="13" height="1"></td>
<td>&nbsp;</td>
</tr>
<tr>
<td colspan="9">
<img src="images/une_01.gif" width="605" height="6"></td>
<td colspan="3" rowspan="3">
<img src="images/une_02.gif" width="295" height="165"></td>
<td>
<img src="images/une_espaceur.gif" width="1" height="6"></td>
</tr>
<tr>
<td rowspan="14">
<img src="images/une_03.gif" width="8" height="1349"></td>
<td colspan="7">
<img src="images/une_04.gif" width="576" height="139"></td>
<td rowspan="4">
<img src="images/une_05.gif" width="21" height="378"></td>
<td>
<img src="images/une_espaceur.gif" width="1" height="139"></td>
</tr>
<tr>
<td colspan="7" rowspan="2">
<img src="images/une_06.gif" width="576" height="230"></td>
<td>
<img src="images/une_espaceur.gif" width="1" height="20"></td>
</tr>
<tr>
<td colspan="3" rowspan="2">
<img src="images/une_07.gif" width="295" height="219"></td>
<td>
<img src="images/une_espaceur.gif" width="1" height="210"></td>
</tr>
<tr>
<td rowspan="11">
<img src="images/une_08.gif" width="1" height="980"></td>
<td rowspan="4">
<img src="images/une_09.gif" width="217" height="189"></td>
<td colspan="5">
<img src="images/une_10.gif" width="358" height="9"></td>
<td>
<img src="images/une_espaceur.gif" width="1" height="9"></td>
</tr>
<tr>
<td colspan="3" rowspan="4">
<img src="images/une_11.gif" width="28" height="237"></td>
<td colspan="4" background="images/une_12.gif" width="589" height="145">
<span style="font-size: 46pt; font-weight: bold;"><?php echo $titre; ?></span></td>
<td colspan="2" rowspan="2">
<img src="images/une_13.gif" width="57" height="148"></td>
<td>
<img src="images/une_espaceur.gif" width="1" height="145"></td>
</tr>
<tr>
<td colspan="4">
<img src="images/une_14.gif" width="589" height="3"></td>
<td>
<img src="images/une_espaceur.gif" width="1" height="3"></td>
</tr>
<tr>
<td rowspan="7">
<img src="images/une_15.gif" width="2" height="565"></td>
<td colspan="4" rowspan="6">
<img src="images/une_16.gif" width="631" height="529"></td>
<td rowspan="7">
<img src="images/une_17.gif" width="13" height="565"></td>
<td>
<img src="images/une_espaceur.gif" width="1" height="32"></td>
</tr>
<tr>
<td>
<img src="images/une_18.gif" width="217" height="57"></td>
<td>
<img src="images/une_espaceur.gif" width="1" height="57"></td>
</tr>
<tr>
<td colspan="2">
<img src="images/une_19.gif" width="218" height="195"></td>
<td colspan="2" rowspan="5">
<img src="images/une_20.gif" width="27" height="476"></td>
<td>
<img src="images/une_espaceur.gif" width="1" height="195"></td>
</tr>
<tr>
<td colspan="2">
<img src="images/une_21.gif" width="218" height="47"></td>
<td>
<img src="images/une_espaceur.gif" width="1" height="47"></td>
</tr>
<tr>
<td>
<img src="images/une_22.gif" width="217" height="193"></td>
<td rowspan="4">
<img src="images/une_23.gif" width="1" height="492"></td>
<td>
<img src="images/une_espaceur.gif" width="1" height="193"></td>
</tr>
<tr>
<td rowspan="3">
<img src="images/une_24.gif" width="217" height="299"></td>
<td>
<img src="images/une_espaceur.gif" width="1" height="5"></td>
</tr>
<tr>
<td colspan="4">
<img src="images/une_25.gif" width="631" height="36"></td>
<td>
<img src="images/une_espaceur.gif" width="1" height="36"></td>
</tr>
<tr>
<td>
<img src="images/une_26.gif" width="13" height="258"></td>
<td colspan="7">
<img src="images/une_27.gif" width="660" height="258"></td>
<td>
<img src="images/une_espaceur.gif" width="1" height="258"></td>
</tr> </table>

Par avance, merci pour votre aide. smile

2

A première vue le code a l'air correct (je ne me suis pas amusé à compter si le nombre de colonnes était le même pour chaque ligne mais supposons que oui), donc soit j'ai loupé l'erreur soit HTML2PDF a un peu de mal à gérer cette mise en page archaïque. Peut-être qu'en remplaçant tous ces horribles "une_espaceur.gif" et autres bricolages par des styles CSS, le rendu serait bon ?
avatar
All right. Keep doing whatever it is you think you're doing.
------------------------------------------
Besoin d'aide sur le site ? Essayez par ici :)

3

Zephyr (./2) :
HTML2PDF a un peu de mal à gérer cette mise en page archaïque.


ben perso, vu comment la mise en page est faite, ca ne m'ettone pas.... ca fait depuis bien longtemps que le coup des faut espaceurs c'est dépassé... y a un truc magnifique qui s'appelle les styles ! petit exemple :

<table style="width: 900px; border: none" cellpadding="0" cellspacing="0" align="center">
 <tr style="height: 1px">
  <td style="width: 8px"></td>
  <td style="width: 1px"></td>
  <td style="width: 217px"></td>
  <td style="width: 1px"></td>
  <td style="width: 13px"></td>
  <td style="width: 14px"></td>
  <td style="width: 2px"></td>
  <td style="width: 328px"></td>
  <td style="width: 21px"></td>
  <td style="width: 238px"></td>
  <td style="width: 44px"></td>
  <td style="width: 13px"></td>
 </tr>


de plus tu demandes une hauteur de 1px, mais tu mets des espaces dans certaines cases => forcement ca augmente la hauteur !
Ancien pseudo : lolo

4

Merci beaucoup. embarrassed

En effet, j'avais fait ça un peu comme un porc. :/

Ca marche maintenant. grin