Insertion image en back-ground dans un fichier PDF généré parHTML2PDF
Fermé
Red6Pc
Messages postés
21
Date d'inscription
mardi 16 juin 2020
Statut
Membre
Dernière intervention
27 avril 2022
-
29 juil. 2020 à 19:08
jordane45 Messages postés 38109 Date d'inscription mercredi 22 octobre 2003 Statut Modérateur Dernière intervention 28 mars 2024 - 30 juil. 2020 à 14:50
jordane45 Messages postés 38109 Date d'inscription mercredi 22 octobre 2003 Statut Modérateur Dernière intervention 28 mars 2024 - 30 juil. 2020 à 14:50
A voir également:
- Insertion image en back-ground dans un fichier PDF généré parHTML2PDF
- Lire le coran en français pdf - Télécharger - Histoire & Religion
- Fichier rar - Guide
- Comment compresser un fichier pdf - Guide
- Fichier host - Guide
- Comment faire un fichier pdf - Guide
2 réponses
jordane45
Messages postés
38109
Date d'inscription
mercredi 22 octobre 2003
Statut
Modérateur
Dernière intervention
28 mars 2024
4 634
29 juil. 2020 à 20:42
29 juil. 2020 à 20:42
Bonjour,
Si tu as mis le background directement sur le body... il faut l'enlever et utiliser une DIV
Si tu as mis le background directement sur le body... il faut l'enlever et utiliser une DIV
Red6Pc
Messages postés
21
Date d'inscription
mardi 16 juin 2020
Statut
Membre
Dernière intervention
27 avril 2022
30 juil. 2020 à 13:34
30 juil. 2020 à 13:34
NON, dans le fichier PHP qui reçoit les données générées par la librairie HTML2PDF, il n'y a pas de balise BODY ... En fait, çà ressemble à ceci :
Donc ici j'ai découvert qu'on parle beaucoup plus d'une balise appelée <page>, ... ainsi le CSS on le définit en dehors de la balise, un peu plus en haut et çà marche bien, vu que j'ai toutes mes données qui ont été renvoyées et mon ATTESTATION DE FIN DE FORMATION DU STAGIAIRE est bel et bien généré en PDF par la librairie HTML2PDF ... Maintenant, c'est juste la Mise En Forme du Cadre qui me casse un peu, vu que les Attestations existantes ont un cadre rouge qui encadre ladite ATTESTATION, ainsi qu'une image en arrière-plan.
J'ai vraiment besoin d'aide pour finaliser mon Projet.
<style type="text/css"> table { width: 100%; color: #717375; font-family: helvetica; line-height: 5mm; border-collapse: collapse; } h2 { margin: 0; padding: 0; text-align: center; } h3 { text-align: center; line-height: 7mm; } h4 { text-align: center; } h5 { text-align: center; } p { margin: 5px; text-align:left; } .border th { border: 1px solid #000; /*border: 1px solid #000;*/ color: white; background: #333; /*background: #000;*/ padding: 5px; font-weight: normal; font-size: 12px; /*font-size: 14px;*/ font-weight: bold; text-align: center; } .border td { border: 0px solid #CFD1D2; padding: 5px 10px; text-align: left; /*text-align: center;*/ } .cadre_rouge { border: 1px solid #000; /* border: 1px solid red;*/ } .data { border: 1px solid #000; } .no-border { border-right: 1px solid #CFD1D2; border-left: none; border-top: none; border-bottom: none; } .space { padding-top: 250px; } .1p { width: 1%; } .2p { width: 2%; } .3p { width: 3%; } .4p { width: 4%; } .5p { width: 5%; } .6p { width: 6%; } .10p { width: 10%; } .15p { width: 15%; } .25p { width: 25%; } .30p { width: 30%; } .33p { width: 33%; } .35p { width: 35%; } .40p { width: 40%; } .50p { width: 50%; } .60p { width: 60%; } .65p { width: 65%; } .75p { width: 75%; } .80p { width: 80%; } .text_footer { font-family:helvetica; font-weight:normal; font-style:normal; color:#717375; text-align:left; } .text_footer2 { font-family:helvetica; font-weight:normal; font-style:normal; color:#717375; text-align:left; } .hr_style { color: #999; } </style> <page backtop="10mm" backleft="10mm" backright="10mm" backbottom="10mm" footer="page;"> <page_header> <table style="margin:auto; margin-top:5px;"> <tr> <td><img src="drapeau.png" width="80" /></td> <!-- <td class="60p"> <h3>SOCIETE</h3> </td> --> <td><img src="logo.png" width="120" /></td> </tr> </table> <!--<hr />--> </page_header> <page_footer> <hr class="hr_style" align="center" /> <table align="center"> <tr> <td class="text_footer2" align="center">Jordan LEFEBRE <br>Directeur Général</td> <td class="2p"></td> <!--<td align="center"><br />4785 Av. Géné De Gaulle</td>--> <td class="1p"></td> <td class="text_footer2" align="right"> <img src="upload/client/<?php echo html_entity_decode($attestation['logo_client']); ?>" style="width:50px;" /> <img src="logo-2.png" width="50" /> </td> </tr> <tr> <td class="text_footer2" align="left">www.******.com</td> </tr> </table> </page_footer> <div style="height:auto; border:2px solid#09F;" class=""> <table style="margin-top: 100px;" align="center" class=""> <tr> <td class="65p"><h2>ATTESTATION DE FIN DE FORMATION</h2></td> </tr> <tr> <td class="65p"><h5>Cette attestation indique que</h5></td> </tr> <tr> <td class="65p"><h4><?php echo html_entity_decode($attestation['nom_stagiaire'].' '.$attestation['prenom1_stagiaire']); ?> (ID : <?php print_r($_GET['imprimer']); ?>)</h4></td> </tr> <tr> <td class="65p"><h4>Né(e) le <?php echo html_entity_decode($attestation['datenaiss_stg']); ?>, <?php echo html_entity_decode($attestation['paysorigine_stg']); ?></h4></td> </tr> <tr> <td class="65p"><h5>a suivi avec succès la formation (has satisfactorily completed the following course)</h5></td> </tr> <tr> <td class="65p"><h3><?php echo html_entity_decode($attestation['lib_formation']); ?></h3></td> </tr> <tr> <td class="65p"><h5>En date du: <?php echo html_entity_decode($attestation['ddebut_session']); ?><br> Valable jusqu'au: <?php echo html_entity_decode($attestation['ddebut_session']); ?></h5></td> </tr> <tr> <td class="65p"> <h5>Client: <?php echo html_entity_decode($attestation['nom_client']); ?> [ Code client: <?php echo html_entity_decode($attestation['code_client']); ?> :: Commande: <?php echo html_entity_decode($attestation['code_cmd']); ?> ] <br>Stage comprenant les modules suivants: <br><?php echo html_entity_decode($attestation['lib_module']); ?></h5> </td> </tr> </table> </div> </page>
Donc ici j'ai découvert qu'on parle beaucoup plus d'une balise appelée <page>, ... ainsi le CSS on le définit en dehors de la balise, un peu plus en haut et çà marche bien, vu que j'ai toutes mes données qui ont été renvoyées et mon ATTESTATION DE FIN DE FORMATION DU STAGIAIRE est bel et bien généré en PDF par la librairie HTML2PDF ... Maintenant, c'est juste la Mise En Forme du Cadre qui me casse un peu, vu que les Attestations existantes ont un cadre rouge qui encadre ladite ATTESTATION, ainsi qu'une image en arrière-plan.
J'ai vraiment besoin d'aide pour finaliser mon Projet.
jordane45
Messages postés
38109
Date d'inscription
mercredi 22 octobre 2003
Statut
Modérateur
Dernière intervention
28 mars 2024
4 634
30 juil. 2020 à 14:50
30 juil. 2020 à 14:50
C'est moi... ou je ne trouve pas trace de ton background url...