PHPackages                             54853315/phantomagick - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Payment Processing](/categories/payments)
4. /
5. 54853315/phantomagick

ActiveLibrary[Payment Processing](/categories/payments)

54853315/phantomagick
=====================

PhantomMagick provides a simple API to ease the process of converting HTML to PDF or images

v1.0(5y ago)0142MITPHPPHP &gt;=7.0

Since Mar 16Pushed 5y agoCompare

[ Source](https://github.com/54853315/phantomagick)[ Packagist](https://packagist.org/packages/54853315/phantomagick)[ Docs](https://github.com/anam-hossain/phantommagick)[ RSS](/packages/54853315-phantomagick/feed)WikiDiscussions master Synced 1w ago

READMEChangelog (1)Dependencies (9)Versions (2)Used By (0)

PhantomMagick - 改造版（增加腾讯COS支持）
==============================

[](#phantommagick---改造版增加腾讯cos支持)

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.

[果酱](http://guojiang.club/)使用PhantomMagick实现生成海报，PhantomMagick只支持七牛上传，不支持COS，特此创建一个仓库实现COS上传。

Features
--------

[](#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
------------

[](#requirements)

- PHP 5.5+
- [PhantomJS](http://phantomjs.org)

Installation
------------

[](#installation)

PhantomMagick is available via Composer:

```
$ composer require 54853315/phantommagick
```

Dependencies
------------

[](#dependencies)

[PhantomJS](http://phantomjs.org/download.html) must be installed to use PhantomMagick.

There are few ways to install PhantomJS:

##### Install binary manually

[](#install-binary-manually)

You can download the official PhantomJS binary from the following link:

.

License
-------

[](#license)

The MIT License (MIT). Please see [LICENSE](http://opensource.org/licenses/MIT) for more information.

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity47

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 60% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

1888d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1081252?v=4)[konakona](/maintainers/54853315)[@54853315](https://github.com/54853315)

---

Top Contributors

[![54853315](https://avatars.githubusercontent.com/u/1081252?v=4)](https://github.com/54853315 "54853315 (3 commits)")[![jianongHe](https://avatars.githubusercontent.com/u/39476157?v=4)](https://github.com/jianongHe "jianongHe (2 commits)")

---

Tags

laravelpdfconverterinvoiceLaravel pdfphantomjshtml-to-pdfpdf converterhtml to imageHtml 2 pdfHtml 2 jpghtml to pngScreen capturePhantomimage converter

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/54853315-phantomagick/health.svg)

```
[![Health](https://phpackages.com/badges/54853315-phantomagick/health.svg)](https://phpackages.com/packages/54853315-phantomagick)
```

###  Alternatives

[anam/phantommagick

PhantomMagick provides a simple API to ease the process of converting HTML to PDF or images

161456.4k2](/packages/anam-phantommagick)[laraveldaily/laravel-invoices

Missing invoices for Laravel

1.5k1.3M4](/packages/laraveldaily-laravel-invoices)[torgodly/html2media

Html2Media is a versatile Laravel package that allows users to convert HTML content into high-quality PDFs with options for either downloading or triggering a print dialog. Ideal for generating documents, invoices, and reports, this package includes configurable settings for file name, page orientation, format, margins, and scale. Html2Media also provides seamless integration with Filament actions, enabling dynamic content rendering in modals and customizable output previews. Whether you need to save a PDF or send it directly to the printer, Html2Media simplifies the process with robust, flexible features.

4532.5k1](/packages/torgodly-html2media)[wemersonjanuario/laravelpdf

Another HTML to PDF Converter for Laravel

2912.9k1](/packages/wemersonjanuario-laravelpdf)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
