A PHP library for generating PDFs and images from URLs or HTML using wkhtmltopdf/wkhtmltoimage.
Snappy is a PHP library that generates PDF documents and image snapshots from URLs or HTML content. It acts as a wrapper for wkhtmltopdf and wkhtmltoimage, allowing developers to programmatically create printable reports, invoices, or thumbnails directly within PHP applications. The library simplifies integrating web page rendering into PHP workflows without requiring complex setup.
PHP developers needing to generate PDFs or images from web pages or HTML content, particularly those working on reporting tools, invoice systems, or document automation in frameworks like Symfony, Laravel, or Zend.
Developers choose Snappy for its straightforward PHP API, seamless integration with popular PHP frameworks, and reliance on the robust wkhtmltopdf engine for accurate web page rendering. It reduces the complexity of directly interfacing with wkhtmltopdf binaries while offering extensive customization options.
PHP library allowing thumbnail, snapshot or PDF generation from a url or a html page. Wrapper for wkhtmltopdf/wkhtmltoimage
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Provides a straightforward interface with simple methods like generateFromHtml and getOutput, as demonstrated in the README's usage examples for quick PDF or image generation.
Offers dedicated bundles for Symfony, Laravel, and Zend Framework, simplifying integration into popular PHP ecosystems without custom setup.
Supports a wide range of wkhtmltopdf options such as disabling JavaScript, adding headers/footers, and custom stylesheets, allowing fine-tuned output control via setOption methods.
Facilitates downloading wkhtmltopdf binaries through Composer dependencies like h4cc/wkhtmltopdf-amd64, easing deployment across systems as noted in the installation section.
The README explicitly warns about risks with wkhtmltopdf's --enable-local-file-access, recommending alternatives like WeasyPrint or Puppeteer for untrusted content due to potential exploits.
Relies on wkhtmltopdf 0.12.x, which is based on an older WebKit version and may lack support for modern web standards, limiting rendering accuracy for contemporary sites.
Static binaries provided via Composer are extracted from Debian packages and may not work on non-Debian Linux distributions, as acknowledged in the README, complicating cross-platform deployment.
The project is actively seeking maintainers, indicating potential delays in updates and bug fixes, which could affect long-term reliability for production use.