I am using Snappy Bundle with Symfony 2.1.
I have a question that I did not find in the documentation of this package:
- How to set the orientation?
- Is there a way to display page numbers?
Here is my config.yml for the package:
knp_snappy: pdf: enabled: true binary: /home/wkhtmltopdf-i386 options: []
Here is one of my controllers for creating pdf:
public function exampleAction() { $html = $this->renderView('MyBundle:Example:test.pdf.twig', $this->param); return new Response($this->get('knp_snappy.pdf')->getOutputFromHtml($html),200, array( 'Content-Type' => 'application/pdf', 'Content-Disposition' => 'attachment; filename="Test.pdf"')); }
Many thanks for your help!
Reveclair
source share