i am using simfony2.x and i want to use knpsnappybundle
budle to create pdf file from html. so i had use this configuration,
knp_snappy:
pdf:
enabled: true
binary: "\"C:\\Program Files\\wkhtmltopdf\\bin\\wkhtmltopdf.exe\""
options: []
image:
enabled: true
binary: "\"C:\\Program Files\\wkhtmltopdf\\bin\\wkhtmltoimage.exe\""
options: []
then after in my contoller i am using this service like
$html = $this->renderView('MyBundle:MyController:view.html.twig', array(
'project' => $project,
'answers' => $answers
));
return new Response(
$this->get('knp_snappy.pdf')->getOutputFromHtml($html), 200, array(
'Content-Type' => 'application/pdf',
'Content-Disposition' => 'attachment; filename="test.pdf"',
'encoding' => 'UTF-8',
)
);
it create pdf file for me but pdf contain wrong design at the time of page break, this is the screen cap of my pdf
and here is my actual Html (from which, this pdf is generated)
so can anyone help me to avoid this issue of html page break ?
thanks