2017 © Pedro Peláez
 

library snappy-service-provider

Snappy Service Provider for Silex

image

nass600/snappy-service-provider

Snappy Service Provider for Silex

  • Monday, September 7, 2015
  • by nass600
  • Repository
  • 1 Watchers
  • 0 Stars
  • 673 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 4 Versions
  • 3 % Grown

The README.md

Snappy Service Provider

Silex Service for snappy library integration., (*1)

Build Status Latest Stable Version Total Downloads License SensioLabsInsight, (*2)

Installation

Require the library in your composer.json file:, (*3)

{
    "require": {
        "nass600/snappy-service-provider": "1.0.1",
    }
}

or execute:, (*4)

composer require "nass600/snappy-service-provider:1.0.1"

Parameters

  • snappy.pdf.binary: Absolute path to wkhtmltopdf.
  • snappy.pdf.options: Array of options to give to Snappy (see wkhtmltopdf doc).
  • snappy.image.binary: Absolute path to wkhtmltoimage.
  • snappy.image.options: Array of options to give to Snappy (see wkhtmltoimage doc).

Services

  • snappy.pdf: Snappy service to create pdf.
  • snappy.image: Snappy service to create image snapshots / thumbnails.

Registering

<?php

use Silex\Application;
use Nass600\Silex\Provider\SnappyServiceProvider;

$app = new Application();

$app->register(new SnappyServiceProvider(), array(
    'snappy.pdf.binary' => '/path/to/wkhtmltopdf',
    'snappy.pdf.options' => array(
        'footer-center' => 'page [page]'
    ),
    'snappy.image.binary' => '/path/to/wkhtmltoimage',
    'snappy.image.options' => array(
        'format' => 'png'
    )
));

Usage

License

MIT, (*5)

Credits

This is a simple Silex Provider to use this amazing tools:, (*6)

  • KnpLabs: The snappy PHP5 library
  • Wkhtmltopdf: The command line tools to render HTML into PDF

Authors

The Versions

07/09 2015

dev-master

9999999-dev http://github.com/nass600/snappy-service-provider

Snappy Service Provider for Silex

  Sources   Download

MIT

The Requires

 

service silex wkhtmltopdf snappy wkhtmltoimage

07/09 2015

v2.0.0

2.0.0.0 http://github.com/nass600/snappy-service-provider

Snappy Service Provider for Silex

  Sources   Download

MIT

The Requires

 

service silex wkhtmltopdf snappy wkhtmltoimage

13/01 2015

v1.0.1

1.0.1.0 http://github.com/nass600/snappy-service-provider

Snappy Service Provider for Silex

  Sources   Download

MIT

The Requires

 

service silex wkhtmltopdf snappy wkhtmltoimage

05/01 2015

v1.0.0

1.0.0.0 http://github.com/nass600/snappy-service-provider

Snappy Service Provider for Silex

  Sources   Download

MIT

The Requires

 

service silex wkhtmltopdf snappy wkhtmltoimage