PHPackages                             wmlc/pdf2image - 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. [PDF &amp; Document Generation](/categories/documents)
4. /
5. wmlc/pdf2image

ActiveLibrary[PDF &amp; Document Generation](/categories/documents)

wmlc/pdf2image
==============

Convert pdf files to images

v1.1.0(5y ago)042MITPHP

Since Apr 24Pushed 5y agoCompare

[ Source](https://github.com/wmlc/pdf2image)[ Packagist](https://packagist.org/packages/wmlc/pdf2image)[ RSS](/packages/wmlc-pdf2image/feed)WikiDiscussions master Synced 3w ago

READMEChangelog (3)Dependencies (1)Versions (10)Used By (0)

已废弃
===

[](#已废弃)

laravel-pdf-to-image
====================

[](#laravel-pdf-to-image)

Convert pdf files to images for Laravel 5

Laravel 5下的 PDF 转图片工具包，

本包提供了Laravel 5 把pdf文件转换为图片的功能, 同时基于Laravel Storage 对生成的图片进行存储和管理。

#### 功能列表：

[](#功能列表)

1. 按页转换PDF文件为图片，每页生成1张图片
2. 保存到指定的存储空间
3. 支持云存储(测试中)
4. 支持定时任务后台转换图片(开发中)
5. 支持队列转换图片(开发中)

#### 依赖 Package dependencies

[](#依赖-package-dependencies)

 必须安装扩展包，You must install package imagick, 参考信息 more info:

 "ext-imagick" : "\*",
 "intervention/image": "^2.0",
 "illuminate/support": "5.\*"

 执行 run: php artisan vendor:publish --provider="Intervention\\Image\\ImageServiceProviderLaravel5"
 then： you will find a new file image.php in folder config. Change " 'driver' =&gt; 'gd' " to " 'driver' =&gt; 'imagick' "

安装Installation:
---------------

[](#安装installation)

```
composer require wmlc/pdf2image

```

##### Laravel &gt;= 5.5, after install nothing left to do.

[](#laravel--55-after-install-nothing-left-to-do)

##### Laravel &lt;5.5

[](#laravel-55)

 Add a provider in providers array in config/app.php:
 wmlc\\Pdf2Image\\Pdf2ImageMaker::class,
 Add a aliase in aliases array:
 'PdfToImage'=&gt;wmlc\\Pdf2Image\\Pdf2ImageFacade::class,

用法
--

[](#用法)

### Get pdf file pages count

[](#get-pdf-file-pages-count)

```
use Pdf2Image;

$pageCount = Pdf2Image::pdfFile(public_path() . "/imgs/test.pdf")->totalPages();
```

### Pdf all page to imgs

[](#pdf-all-page-to-imgs)

```
use Pdf2Image;

Pdf2Image::pdfFile(public_path() . "/imgs/test.pdf")->saveImages();
```

### Pdf one page to img

[](#pdf-one-page-to-img)

```
use Pdf2Image;

Pdf2Image::pdfFile(public_path() . "/imgs/test.pdf")->saveImage(0);
```

###  Health Score

29

—

LowBetter than 57% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity69

Established project with proven stability

 Bus Factor1

Top contributor holds 89.7% 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

Every ~145 days

Recently: every ~289 days

Total

9

Last Release

1835d ago

Major Versions

v0.4.1 → v1.0.02021-06-21

### Community

Maintainers

![](https://www.gravatar.com/avatar/73dc84d086831406f808bc08ba2c6b46b18c580714acef75befedb3a32b21492?d=identicon)[wmlc](/maintainers/wmlc)

---

Top Contributors

[![jianhuawang](https://avatars.githubusercontent.com/u/16495687?v=4)](https://github.com/jianhuawang "jianhuawang (35 commits)")[![wmlc](https://avatars.githubusercontent.com/u/12483202?v=4)](https://github.com/wmlc "wmlc (4 commits)")

---

Tags

laravelpdflaravel 5pdf-to-imageconvert image pdt-to-image

### Embed Badge

![Health badge](/badges/wmlc-pdf2image/health.svg)

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

###  Alternatives

[barryvdh/laravel-dompdf

A DOMPDF Wrapper for Laravel

7.4k99.4M384](/packages/barryvdh-laravel-dompdf)[spatie/pdf-to-image

Convert a pdf to an image

1.5k16.5M99](/packages/spatie-pdf-to-image)[unopim/unopim

UnoPim Laravel PIM

10.5k2.4k](/packages/unopim-unopim)[lucasromanojf/laravel5-pdf

Provides the HTML2PDF functionality using the wkhtmltopdf library (Laravel 5)

1272.2k](/packages/lucasromanojf-laravel5-pdf)[initred/laravel-tabula

laravel-tabula is a tool for liberating data tables trapped inside PDF files for the Laravel framework.

1418.6k](/packages/initred-laravel-tabula)

PHPackages © 2026

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