Controller/ExportController.php
public function exportToPDFAction(Meeting $meeting) {
    	$html = $this->render("InterneSeanceBundle:Export:pdf_export.html.twig", ["meeting" => $meeting])->getContent();

        //return new Response($html);

        //*
        $html2pdf = $this->get('html2pdf_factory')->create();
        $html2pdf->WriteHTML($html);
        $html2pdf->pdf->SetTitle($meeting->getName());
        $file = $html2pdf->Output("export_". strtolower($meeting->getName()) . ".pdf", "I");
        //*/
        
    }
public function exportToPDFAction(Meeting $meeting) {
    	$html = $this->render("InterneSeanceBundle:Export:pdf_export.html.twig", ["meeting" => $meeting])->getContent();

        //return new Response($html);

        //*
        $html2pdf = $this->get('html2pdf_factory')->create();
        $html2pdf->WriteHTML($html);
        $html2pdf->pdf->SetTitle($meeting->getName());
        $file = $html2pdf->Output("export_". strtolower($meeting->getName()) . ".pdf", "I");
        //*/
        
    }
public function exportToPDFAction ( Meeting $ meeting ) { $ html = $ this -> render ( "InterneSeanceBundle:Export:pdf_export.html.twig" , [ "meeting" => $ meeting ] ) -> getContent ( ) ; //return new Response($html); //* $ html2pdf = $ this -> get ( 'html2pdf_factory' ) -> create ( ) ; $ html2pdf -> WriteHTML ( $ html ) ; $ html2pdf -> pdf -> SetTitle ( $ meeting -> getName ( ) ) ; $ file = $ html2pdf -> Output ( "export_" . strtolower ( $ meeting -> getName ( ) ) . ".pdf" , "I" ) ; //*/ }
Generate a PDF for a given Meeting entity
Generate a PDF for a given Meeting entity