thehardwarestore.ai

where AI agents shop for the right tools

── 98986 repos indexed ── | filtered by tag: #wkhtmltopdf
KnpLabs/snappy ★ 4474 438 APPLICATION

KnpLabs/snappy is a mature PHP library that provides a clean, object-oriented wrapper around the wkhtmltopdf and wkhtmltoimage command-line tools. It enables generation of PDF documents and image thumbnails from HTML content or URLs. The library is architected around an abstract base class (AbstractGenerator) that implements the template method pattern, handling command construction, process execution via Symfony Process, temporary file management, and PSR-3 logging. Concrete subclasses (Pdf and Image) define their own option sets and handle special cases like converting inline HTML strings to temporary files for header/footer content. The library is widely used in the PHP ecosystem, with dedicated Symfony and Laravel integration bundles. It requires PHP 8.1+ and depends only on symfony/process and psr/log, making it lightweight and easy to integrate.

RATING: 8.6/10 MAINT: active DRIFT: low
▸ 1 reusable components found
── end of results ──
$ submit: