PHPackages                             setasign/setapdf-image-extractor - 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. setasign/setapdf-image-extractor

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

setasign/setapdf-image-extractor
================================

A proof-of-concept for extracting images from PDF files with SetaPDF.

2251[3 issues](https://github.com/Setasign/SetaPDF-ImageExtractor/issues)PHP

Since Jun 17Pushed 2mo ago2 watchersCompare

[ Source](https://github.com/Setasign/SetaPDF-ImageExtractor)[ Packagist](https://packagist.org/packages/setasign/setapdf-image-extractor)[ RSS](/packages/setasign-setapdf-image-extractor/feed)WikiDiscussions main Synced yesterday

READMEChangelogDependenciesVersions (1)Used By (0)

SetaPDF-ImageExtractor
======================

[](#setapdf-imageextractor)

This package is a proof of concept to extract images from PDFs in pure PHP with the SetaPDF-Core component and an image render module. Currently, not all kinds of images are supported. This is also very dependent on your used image renderer library. GD and Imagick are currently implemented. We recommend you to use Imagick as it's more feature complete as GD but may be a little harder to install.

Requirements
------------

[](#requirements)

This package is developed and tested on PHP &gt;= 7.4.

You'll need an active license of the [SetaPDF-Core](https://www.setasign.com/products/setapdf-core/details/) component.

Requirements of the SetaPDF-Core component can be found [here](https://manuals.setasign.com/setapdf-core-manual/installation/#index-1).

Usage
-----

[](#usage)

This example here extracts all images from the first page of the pdf:

```
$document = SetaPDF_Core_Document::loadByFilename('your-pdf-file.pdf');
$images = \setasign\SetaPDF\ImageExtractor\ImageExtractor::getImagesByPageNo($document, 1);
foreach ($images as $imageData) {
    // if you're using imagick
    $imagick = \setasign\SetaPDF\ImageExtractor\ImageExtractor::toImage($imageData, ImageExtractor::IMAGE_RENDERER_IMAGICK);
    $imagick->setImageFormat('png');
    $image = $imagick->getImageBlob();
    $imagick->destroy();
    echo '';

    // if you're using gd use this code instead
    $gd = ImageExtractor::toImage($imageData, ImageExtractor::IMAGE_RENDERER_GD);
    ob_start();
    imagepng($gd);
    $image = ob_get_clean();
    imagedestroy($gd);
    echo '';
}
```

License
-------

[](#license)

This package is open-sourced software licensed under the [MIT license](https://opensource.org/licenses/MIT).

###  Health Score

18

—

LowBetter than 7% of packages

Maintenance38

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity11

Early-stage or recently created project

 Bus Factor1

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

### Community

Maintainers

![](https://www.gravatar.com/avatar/78b46f7020bdcd25e761812659988691e50aba9a25b2a48ea33f6137f2fc2536?d=identicon)[Setasign](/maintainers/Setasign)

---

Top Contributors

[![MaximilianKresse](https://avatars.githubusercontent.com/u/545671?v=4)](https://github.com/MaximilianKresse "MaximilianKresse (18 commits)")[![JanSlabon](https://avatars.githubusercontent.com/u/12390057?v=4)](https://github.com/JanSlabon "JanSlabon (14 commits)")

---

Tags

image-extractionpdfphpsetapdf

### Embed Badge

![Health badge](/badges/setasign-setapdf-image-extractor/health.svg)

```
[![Health](https://phpackages.com/badges/setasign-setapdf-image-extractor/health.svg)](https://phpackages.com/packages/setasign-setapdf-image-extractor)
```

###  Alternatives

[rodenastyle/stream-parser

PHP Multiformat Streaming Parser

442206.4k2](/packages/rodenastyle-stream-parser)[cybermonde/odtphp

ODT document generator

49123.4k1](/packages/cybermonde-odtphp)[akeneo-labs/excel-connector-bundle

Akeneo PIM Excel connector bundle

166.4k](/packages/akeneo-labs-excel-connector-bundle)

PHPackages © 2026

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