Browse files

added download option and w3 css3 hints to documentation

  • Loading branch information...
1 parent 6cccfa4 commit d0ce4f800af46e219df4a2af5f76975427bbfc89 DerStoffel committed Feb 14, 2012
Showing with 9 additions and 4 deletions.
  1. +9 −4 README.markdown
@@ -9,10 +9,10 @@ Installation
*If your are using git and manages your vendors as submodules, use the following commands to add this bundle to your Symfony project.*
-Copy the SpraedPDFGeneratorBundle into the `vendor/bundles/Spraed/PDFGeneratorBundle` directory:
+Copy the SpraedPDFGeneratorBundle into the `vendor/bundles/Spraed/PDFGeneratorBundle` directory:
git submodule add vendor/bundles/Spraed/PDFGeneratorBundle
Or use deps file:
@@ -41,10 +41,15 @@ Usage
There is a service registered in the services.yml to generate pdf files.
Just call the PDF generator from the service class and call the generatePDF()-method
with the XHTML and the url of the PDF:
$html = $this->renderView('AcmeDemoBundle:Default:index.html.twig');
$pdfGenerator = $this->get('spraed.pdf.generator');
- $pdfGenerator->generatePDF($html, 'out.pdf');
+Also you are able to set an download option (true/false), standard is false
+ $pdfGenerator->generatePDF($html, 'out.pdf', true);
+To define proper print css you might want to read into the's hints on that

0 comments on commit d0ce4f8

Please sign in to comment.