Bonjour à tous,
je viens demandé un petit coup de main, car j'ai une difficulté sur l'utilisation de KnpSnappyBundle et wkhtmltopdf sous windows.
lors de l'appel du pdf, j'ai cette erreur :
Voici mon code d'appel :The exit status code '-1073741819' says something went wrong:
stderr: ""
stdout: ""
command: "C:/srvweb/apache/htdocs/TDEX/app/Resources/native/windows/wkhtmltopdf/bin/wkhtmltopdf.exe" --lowquality --orientation "Landscape" --images --enable-javascript "C:\Temp\knp_snappy54f6c3dd196b82.81132937.html" "C:\Temp\knp_snappy54f6c3dd1ae289.36784263.pdf".
500 Internal Server Error - RuntimeException
je test sur un windows 7 64bits. Pour information, j'ai tester sur MAC OSX est cela fonctionne nickel. Je compte tester aussi sur CentOS.
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24 $html = $this->renderView("AppTdexBundle:App/Statistiques/IncludeStat:IncludeGenPdfAff.html.twig", array( 'user' => $user, 'juri' => $juri, 'graph' => array('chartGlMaMi' => $ob, 'chartGlDefExt' => $ob2, 'chartGlYear' => $ob3))); $tmpPdf = "_tmpPdf_".$user->getId()."_". time().".pdf"; $snappy = $this->get('knp_snappy.pdf'); return new Response( $snappy->getOutputFromHtml($html, array( 'orientation' => 'Landscape', 'images' => true, 'enable-javascript' => true )), 200, array( 'Content-Type' => 'application/pdf', 'Content-Disposition' => 'attachment; filename="'.$tmpPdf.'"' ) );
J'ai cherché sur pas mal de forum, mais tout les tests ont échoués.
Merci d'avance pour votre aide
Yasen
Partager