src/Austinw/Pdfdf/PdfdfServiceProvider.php
public function register()
    {
        $this->app->singleton('pdfdf.factory', function($app) {
            $factoryPath = $app['config']->get('pdfdf::pdftk');

            return new PDFTKFactory($factoryPath);
        });

        $this->app->bind('pdftkDumpParser', function($app, $file) {
            return new PdftkDumpParser($file);
        });

        $this->app['pdfdf'] = $this->app->share(function($app) {
            $pdfdf = new Pdfdf(new PdfForm, new FdfWriter);
            $pdfdf->registerFactory($app['pdfdf.factory']);

            $pdfdf->setConfiguration(array(
                'tmp'            => $app['config']->get('pdfdf::storage.tmp'),
                'pdf'            => $app['config']->get('pdfdf::storage.pdf'),
                'erase_temp_fdf' => $app['config']->get('pdfdf::erase_temp_fdf'),
            ));

            return $pdfdf;
        });
    }
public function register()
    {
        $this->app->singleton('pdfdf.factory', function($app) {
            $factoryPath = $app['config']->get('pdfdf::pdftk');

            return new PDFTKFactory($factoryPath);
        });

        $this->app->bind('pdftkDumpParser', function($app, $file) {
            return new PdftkDumpParser($file);
        });

        $this->app['pdfdf'] = $this->app->share(function($app) {
            $pdfdf = new Pdfdf(new PdfForm, new FdfWriter);
            $pdfdf->registerFactory($app['pdfdf.factory']);

            $pdfdf->setConfiguration(array(
                'tmp'            => $app['config']->get('pdfdf::storage.tmp'),
                'pdf'            => $app['config']->get('pdfdf::storage.pdf'),
                'erase_temp_fdf' => $app['config']->get('pdfdf::erase_temp_fdf'),
            ));

            return $pdfdf;
        });
    }
Register the service provider.

@return void