diff --git a/src/Laravel/LaravelServiceProvider.php b/src/Laravel/LaravelServiceProvider.php index 1358ecd..b6e93fd 100644 --- a/src/Laravel/LaravelServiceProvider.php +++ b/src/Laravel/LaravelServiceProvider.php @@ -30,6 +30,10 @@ public function register() $generator->setStoragePath($this->app['config']['phantom-pdf.temporary_file_path']); $generator->setTimeout($this->app['config']['phantom-pdf.timeout']); + if ($this->app['config']['phantom-pdf.conversion_script']) { + $generator->useScript($this->app['config']['phantom-pdf.conversion_script']); + } + foreach ($this->app['config']['phantom-pdf.command_line_options'] as $option) { $generator->addCommandLineOption($option); } diff --git a/src/config/config.php b/src/config/config.php index 79ef4c8..838324a 100644 --- a/src/config/config.php +++ b/src/config/config.php @@ -50,6 +50,18 @@ 'binary_path' => __DIR__ . '/../../bin/phantomjs', + /* + |-------------------------------------------------------------------------- + | Conversion Script + |-------------------------------------------------------------------------- + | + | The script used by PhantomJS to convert the page to PDF. If not set the + | default script will be used. + | + */ + + 'conversion_script' => null, + /* |-------------------------------------------------------------------------- | PhantomJS Command Line Options