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.

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

Since Jun 16Pushed 10mo 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

13

—

LowBetter than 1% of packages

Maintenance18

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity14

Early-stage or recently created project

 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.

### 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 (12 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

[phpoffice/phpspreadsheet

PHPSpreadsheet - Read, Create and Write Spreadsheet documents in PHP - Spreadsheet engine

13.9k293.5M1.3k](/packages/phpoffice-phpspreadsheet)[spatie/browsershot

Convert a webpage to an image or pdf using headless Chrome

5.2k32.1M102](/packages/spatie-browsershot)[smalot/pdfparser

Pdf parser library. Can read and extract information from pdf file.

2.7k34.5M216](/packages/smalot-pdfparser)[barryvdh/laravel-snappy

Snappy PDF/Image for Laravel

2.8k24.8M48](/packages/barryvdh-laravel-snappy)[openspout/openspout

PHP Library to read and write spreadsheet files (CSV, XLSX and ODS), in a fast and scalable way

1.1k57.6M131](/packages/openspout-openspout)[keboola/csv

Keboola CSV reader and writer

1451.8M21](/packages/keboola-csv)

PHPackages © 2026

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