# spatie/pdf-to-image

Convert a pdf to an image

Repository: https://github.com/spatie/pdf-to-image
Canonical: https://ross.abutalabs.com/products/pdf-to-image
Homepage: https://murze.be/2015/07/convert-a-pdf-to-an-image-using-php/
Language: PHP
License: MIT
License Family: permissive
Topics: php, pdf, convert, image, imagick, ghostscript
Last push: 2026-08-07T12:05:23+00:00

## Health v2 (maintenance only)
Score: 88/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 96, release rhythm 72, longevity 100
- inputs: {"age_days": 4080, "days_push": 26, "days_rel": 26, "gap_med": 137, "n_releases_24m": 4}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1457, forks 231 (observed 2026-08-28T04:04:47.034252+00:00)

## What it is
A PHP library that converts PDF files to images (jpg, png, webp) using Imagick and Ghostscript. It supports rendering single or multiple pages, choosing output format, and setting quality and resolution.

## Use cases
- convert pdf pages to images in php
- render pdf thumbnail from first page
- extract specific pages of a pdf as png
- generate webp images from pdf documents
- get page count of a pdf file
- batch convert pdf documents to jpg

## When to choose
- you're on PHP 8.2+ and need simple PDF-to-image conversion
- you want per-page selection and multiple output formats
- you already have Imagick and Ghostscript installed

## When to avoid
- you can't install Ghostscript or Imagick on your server
- you need pure-PHP PDF rendering without native dependencies
- you need to extract text or vector data rather than raster images

## Facets
- artifact type: library
- maturity: active
- function: image-processing, pdf
- domain: pdf, files, web-development
- platform: php, cli
- tags: pdf-to-image, imagick, ghostscript, spatie, composer

## Member repositories
- spatie/pdf-to-image (main) score 88

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:04:47.034252+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T04:35:34.190093+00:00, confidence not recorded.
  - readme: https://github.com/spatie/pdf-to-image (fetched 2026-08-28T04:04:47.034252+00:00, sha 842c27f94c91)
- Data as of 2026-08-30T08:39:29.467469+00:00.
