54853315 / phantomagick
PhantomMagick provides a simple API to ease the process of converting HTML to PDF or images
Requires
- php: >=7.0
- anam/phantomjs-linux-x86-binary: ~2.1.1
- aws/aws-sdk-php: ^3.87
- freyo/flysystem-qcloud-cos-v5: ^2.1
- league/flysystem: ~1.0
- league/flysystem-aws-s3-v3: ^1.0
- overtrue/flysystem-qiniu: ^1.0
Requires (Dev)
- mockery/mockery: ~0.9
- orchestra/testbench: ~3.5
- phpunit/phpunit: ~6.0
This package is auto-updated.
Last update: 2025-03-16 16:10:02 UTC
README
PhantomMagick provides a simple API to ease the process of converting HTML to PDF or images. It's especially handy for things like generating invoices or capturing screenshots of websites. It's framework agnostic but it does provide a facade for simple use in Laravel 4/5.
果酱使用PhantomMagick实现生成海报,PhantomMagick只支持七牛上传,不支持COS,特此创建一个仓库实现COS上传。
Features
- Convert HTML to a PDF
- Convert HTML to an image (PNG, JPG or GIF)
- Support multipage PDFs
- Capture a web page as a screenshot
- Save PDF or image to local disk or to the cloud (S3, Dropbox or Rackspace)
- Framework agnostic, with optional Laravel integration
- (!!!New)Save PDF or Image to COS
Requirements
- PHP 5.5+
- PhantomJS
Installation
PhantomMagick is available via Composer:
$ composer require 54853315/phantommagick
Dependencies
PhantomJS must be installed to use PhantomMagick.
There are few ways to install PhantomJS:
Install binary manually
You can download the official PhantomJS binary from the following link:
http://phantomjs.org/download.html.
License
The MIT License (MIT). Please see LICENSE for more information.