HTML2PDF et les tables :s
MuronY
Messages postés
47
Date d'inscription
Statut
Membre
Dernière intervention
-
spipu -
spipu -
Bonjour a tous,
Je tente en ce moment de convertir un page html/php en pdf
J'utilise donc html2pdf qui est un outils qui répondrai exactement a mes attentes.
Héla hélas celui ne fait que des bêtise
Pourtant le code de ma page est le plus simple possible afin d'avoir un résultat impeccable même avec ces précautions la page s'affiche mal : s
Donc rien de bien complexe dans le code et le résultat en HTML est parfait
petit screen :
La page HTML :
http://img53.imageshack.us/img53/2246/screenle4.jpg
La page en pdf : :x
http://img57.imageshack.us/img57/7015/screen2pl1.jpg
Je tente en ce moment de convertir un page html/php en pdf
J'utilise donc html2pdf qui est un outils qui répondrai exactement a mes attentes.
Héla hélas celui ne fait que des bêtise
Pourtant le code de ma page est le plus simple possible afin d'avoir un résultat impeccable même avec ces précautions la page s'affiche mal : s
<?php ob_start(); ?> <page> <table width="760" height="1126" border=0 style="background:url(../../../images/bdc3.jpg);"> <tr> <td valign="top"> <table border=0 width=760 height=112> <tr> <td> </td> </tr> </table> <table border=0 width=760 height=20> <tr> <td width=590> </td> <td>bbbb </td> </tr> </table> <table border=0 width=760 height=30> <tr> <td> </td> </tr> </table> <table border=0 width=760 height=75> <tr> <td width=355> </td> <td>bbbbbbbb <br> bbbbb <br> bbbb <br> bbbb </td> </tr> </table> <table border=0 width=760 height=30> <tr v align="top"> <td width="220"> </td> <td>bbbbb </td> </tr> </table> <table border=0 width=760 height=55> <tr> <td> </td> </tr> </table> <table border=0 width=760 height=42> <tr> <td width=5> </td> <td>bbbbb </td> </tr> </table> <table border=0 width=760 height=30> <tr> <td width=195> </td> <td><span style="margin-left:25px;">bbbbbb</span> <br> bbbbbb </td> </tr> </table> <table border=0 width=760 height=70> <tr> <td> </td> </tr> </table> <TABLE border=0 height="350" width=760> <TR valign="top"> <TD width=80>bbbb</TD> <TD width=310>bbbbb</TD> <TD width=72>bbbbbb</TD> <TD width=82>bbbbbb</TD> <TD width=82>bbbbb</TD> </TR> </table> <table border=0 width=760 height=0> <tr> <td> </td> </tr> </table> <table border=0 width=760 height=0> <tr> <td width=660> </td> <td>bbbbbbbb </td> </tr> </table> <table border=0 width=760 height=40> <tr> <td> </td> </tr> </table> <table border=0 width=760 height=25> <tr> <td width="242">bbbbbb </td> <td width="245">bbbbbb </td> <td>bbbbbbb </td> </tr> </table> <table border=0 width=760 height=165> <tr> <td> </td> </tr> </table> </td> </tr> </table> </page> <?php $content = ob_get_clean(); require_once(dirname(__FILE__).'/../html2pdf.class.php'); $pdf = new HTML2PDF('P','A4'); $pdf->WriteHTML($content, isset($_GET['vuehtml'])); $pdf->Output(); ?>
Donc rien de bien complexe dans le code et le résultat en HTML est parfait
petit screen :
La page HTML :
http://img53.imageshack.us/img53/2246/screenle4.jpg
La page en pdf : :x
http://img57.imageshack.us/img57/7015/screen2pl1.jpg
A voir également:
- Html2pdf table
- Table ascii - Guide
- Table des matières word - Guide
- Table des caractères - Guide
- No bootable partition in table ✓ - Forum Windows
- Tableau croisé dynamique ou table de pilote - Guide