symfony - Symfony2 Knp-snappy to generate PDF from a twig view that contain heicharts -
i want generate pdf file twig view contains heighcharts heighcharts not displayed in pdf file. why ? suggestions
$html = $this->render('acmequizbundle:resultat:show.html.twig', array( 'entity' => $entity, 'chart'=>$ob )); return new response( $this->get('knp_snappy.pdf')->getoutputfromhtml($html,array('encoding'=>'utf-8','enable-javascript' => true,'images' => true)), 200, array( 'content-type' => 'application/pdf', 'content-disposition' => 'attachment; filename="rapport.pdf"' ) );
highcharts js library, uses client's browser generate charts. should generate charts on server side in image format , include pdf twig template.
some info server side charts generation: http://www.highcharts.com/component/content/article/2-articles/news/52-serverside-generated-charts
Comments
Post a Comment