dev-master
9999999-dev http://github.com/rajuniit/FalgunPhantomBundleGenerate pdf using phantomjs
MIT
The Requires
- php >=5.3.2
The Development Requires
by Raju Mazumder
symfony2 pdf phantomjs
Generate pdf using phantomjs
A symfony 2 bundle to generate pdf using phantomjs., (*1)
Install phantomjs 1.9.2 from this link http://phantomjs.org/download.html, (*2)
Add FalgunPhantomBundle in your composer.json as below:, (*3)
"falgun/phantom-bundle": "dev-master"
Update/install with this command:, (*4)
php composer.phar update "falgun/phantom-bundle"
Register the bundle, (*5)
public function registerBundles() { $bundles = array( ... new Falgun\Bundle\PhantomBundle\FalgunPhantomBundle(), );
# app/config/config.yml falgun_phantom: config: format: 'A3' margin: '.5cm' zoom: 1 orientation: 'portrait' rendering_time: 1000 viewport_width: 800 viewport_height: 800 rendering_timeout: 90000 phantomjs: '/usr/local/bin/phantomjs'
public function indexAction() { $falgun_pdf = $this->get('falgun_pdf'); $result = $falgun_pdf->to_pdf("http://www.google.com"); }
Generate pdf using phantomjs
MIT
symfony2 pdf phantomjs