Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

added download option and w3 css3 hints to documentation

  • Loading branch information...
commit d0ce4f800af46e219df4a2af5f76975427bbfc89 1 parent 6cccfa4
@DerStoffel DerStoffel authored
Showing with 9 additions and 4 deletions.
  1. +9 −4 README.markdown
View
13 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 https://github.com/stedekay/SpraedPDFGeneratorBundle.git vendor/bundles/Spraed/PDFGeneratorBundle
-
+
Or use deps file:
[SpraedPDFGeneratorBundle]
@@ -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 w3.org's hints on that
+[w3.org]: http://www.w3.org/TR/css3-page/
[flyingsaucer]: http://code.google.com/p/flying-saucer/
[spraed]: http://www.spraed.com
Please sign in to comment.
Something went wrong with that request. Please try again.