Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HTML2PDF_exception: ERREUR n°5 : Code HTML non valide, toutes les balises doivent être fermées.Etat : Array ( [0] => page ) in C:\wamp64\www\missions_msas\etat_pdf\vendor\spipu\html2pdf\_class\parsingHtml.class.php on line 222 #528

Open
madinaserigne opened this issue Dec 31, 2019 · 0 comments

Comments

@madinaserigne
Copy link

@madinaserigne madinaserigne commented Dec 31, 2019

Hi,
I have begining in html2pdf and I have this warning:
Warning: count(): Parameter must be an array or an object that implements Countable in C:\wamp64\www\missions_msas\etat_pdf\vendor\spipu\html2pdf_class\locale.class.php on line 68
Here is my code
`<?php
$mission_agent_id= $_POST['mission_agent_id'];
include(dirname(FILE).'/../functions.php');
$bdd_mission_msas=connect();
$reponse_agent_missions_page = $bdd_mission_msas->query('SELECT agt.prenom,agt.nom,agt.fonction,sitf.siuationfamille,grd.nom_grade,
miss.lieu,miss.motif,miss.depart_mission,miss.arrivee_mission FROM missions miss,agent agt,
situation_famille sitf,grade grd,mission_agents missagt where miss.mission_id='.$mission_agent_id.'
and missagt.mission_id=miss.mission_id and missagt.agent_id=agt.agent_id and agt.grade_id=grd.grade_id and
agt.sitfamille_id=sitf.sitfamille_id;');

	while ($donnees_mission_agents_page = $reponse_agent_missions_page->fetch())

{
//$date_mission_fiche=date("d/m/Y", strtotime($donnees_mission_fiche ['depart_mission']));
$prenom_agent=$donnees_mission_agents_page ['prenom'];
$nom_agent=$donnees_mission_agents_page ['nom'];
$fonction_agent=$donnees_mission_agents_page ['fonction'];
$sitfamille_agent=$donnees_mission_agents_page ['siuationfamille'];
$grade_agent=$donnees_mission_agents_page ['nom_grade'];
$lieu_agent=$donnees_mission_agents_page ['lieu'];
$motif_agent=$donnees_mission_agents_page ['motif'];
$depart_mission_agent=$donnees_mission_agents_page ['depart_mission'];
$retour_mission_agent=$donnees_mission_agents_page ['arrivee_mission'];

?>
<page backtop="25mm" backbottom="10mm>
<page_header>

	<div align="left" ><?php echo date('d/m/Y');?></div>
        
		 <div align="right" >page [[page_cu]]/[[page_nb]]</div>

</page_header>

<h3>ORDRE DE MISSION</h3>
Monsieur  <?php echo $prenom_agent ;?>  <?php echo $nom_agent ;?>
 <?php echo $grade_agent ;?>  <?php echo $fonction_agent ;?>
Motif de la mission : <?php echo $motif_agent ;?>
Date de départ : <?php echo $depart_mission_agent ;?>
Date de retour :  <?php echo $retour_mission_agent ;?>
Imputation budgétaire des frais de transport :.....................
Chapitre............................Article ..................................
closeCursor(); ?> ` here is the html2pdf.php `ob_start();

include(dirname(FILE).'/sortie_pdf_ordre_missions_agents.php');

$content_mission_agent = ob_get_clean();

require_once(dirname(__FILE__).'/vendor/autoload.php');

$html2pdf = new HTML2PDF('P', 'A4', 'fr');

$html2pdf->WriteHTML($content_mission_agent);
$html2pdf->Output('etat_ordre_mission_agent.pdf');

?>
`
I need help please ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant
You can’t perform that action at this time.