Download the PHP package knplabs/knp-snappy without Composer
On this page you can find all versions of the php package knplabs/knp-snappy. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download knplabs/knp-snappy
More information about knplabs/knp-snappy
Files in knplabs/knp-snappy
Package knp-snappy
Short Description PHP library allowing thumbnail, snapshot or PDF generation from a url or a html page. Wrapper for wkhtmltopdf/wkhtmltoimage.
License MIT
Homepage http://github.com/KnpLabs/snappy
Informations about the package knp-snappy
Snappy
Snappy is a PHP library allowing thumbnail, snapshot or PDF generation from a url or a html page. It uses the excellent webkit-based wkhtmltopdf and wkhtmltoimage available on OSX, linux, windows.
You will have to download wkhtmltopdf 0.12.x
in order to use Snappy.
Please, check FAQ before opening a new issue. Snappy is a tiny wrapper around wkhtmltox, so lots of issues are already answered, resolved or wkhtmltox ones.
Following integrations are available:
knplabs/knp-snappy-bundle
, for Symfonybarryvdh/laravel-snappy
, for Laravelmvlabs/mvlabs-snappy
, for Zend Framework
Installation using Composer
Usage
Initialization
Display the pdf in the browser
Download the pdf from the browser
Merge multiple urls into one pdf
Generate local pdf file
Pass options to snappy
Reset options
Options can be reset to their initial values with resetOptions()
method.
wkhtmltopdf binary as composer dependencies
If you want to download wkhtmltopdf and wkhtmltoimage with composer you add to composer.json
:
or this if you are in 64 bit based system:
And then you can use it
N.B. These static binaries are extracted from Debian7 packages, so it might not be compatible with non-debian based linux distros
Some use cases
If you want to generate table of contents and you want to use custom XSL stylesheet, do the following:
Bugs & Support
If you found a bug please fill a detailed issue with all the following points. If you need some help, please at least provide a complete reproducer so we could help you based on facts rather than assumptions.
- OS and its version
- Wkhtmltopdf, its version and how you installed it
- A complete reproducer with relevant php and html/css/js code
If your reproducer is big, please try to shrink it. It will help everyone to narrow the bug.
Maintainers
KNPLabs is looking for maintainers (see why).
If you are interested, feel free to open a PR to ask to be added as a maintainer.
We’ll be glad to hear from you :)
Credits
Snappy has been originally developed by the KnpLabs team.