Registry / utility / knplabs-knp-snappy

knplabs-knp-snappy

JSON →
library1.7.2phppackagistunverified

PHP library allowing thumbnail, snapshot or PDF generation from a url or a html page. Wrapper for wkhtmltopdf/wkhtmltoimage.

composer require knplabs/knp-snappy
INSTALL
IMPORT
SIG · KNPLABS-KNP-SNAPPY
K
knplabs-knp-snappy
utilityphpv1.7.2
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Pdf
use Knp\Snappy\Pdf;

Generate a PDF from HTML.

use Knp\Snappy\Pdf; $snappy = new Pdf('/usr/local/bin/wkhtmltopdf'); $snappy->generateFromHtml('<h1>Hello</h1>', '/tmp/output.pdf');
Debug
Known issues
gotchaRequires wkhtmltopdf binary installed separately.
fix
Install wkhtmltopdf from https://wkhtmltopdf.org/downloads.html
affects: >=1.0.0
Upgrade
Version history
1.7.2latest on Packagist
Audit
Dependencies

No dependency data recorded yet.

Agent activity
4 hits · last 30 days
node
4
Resources
knplabs-knp-snappy — pip install knplabs-knp-snappy · libregistry