PHPackages                             org\_heigl/ghostscript - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. org\_heigl/ghostscript

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

org\_heigl/ghostscript
======================

A PHP-Wrapper around the Ghostscript-CLI

2.4.0(1y ago)401.9M↓37.6%12[1 issues](https://github.com/heiglandreas/Org_Heigl_Ghostscript/issues)4MITPHPPHP ^7.4||^8.0CI passing

Since May 25Pushed 1y ago4 watchersCompare

[ Source](https://github.com/heiglandreas/Org_Heigl_Ghostscript)[ Packagist](https://packagist.org/packages/org_heigl/ghostscript)[ RSS](/packages/org-heigl-ghostscript/feed)WikiDiscussions master Synced 1w ago

READMEChangelog (8)Dependencies (2)Versions (14)Used By (4)

Org\_Heigl\\Ghostscript
=======================

[](#org_heiglghostscript)

[![CI](https://github.com/heiglandreas/Org_Heigl_Ghostscript/actions/workflows/ci.yml/badge.svg)](https://github.com/heiglandreas/Org_Heigl_Ghostscript/actions/workflows/ci.yml)[![Coverage Status](https://camo.githubusercontent.com/76e653f50711c92e27cc0eac8cd53132676915807608b5786459902a7bfe4225/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6769746875622f686569676c616e64726561732f4f72675f486569676c5f47686f73747363726970742f62616467652e7376673f6272616e63683d6d6173746572)](https://coveralls.io/github/heiglandreas/Org_Heigl_Ghostscript?branch=master)[![Latest Stable Version](https://camo.githubusercontent.com/67a631364a6e5af25d7a7138a9416f1e06381b1b278aaac003d32a991ed58a82/687474703a2f2f706f7365722e707567782e6f72672f6f72675f686569676c2f67686f73747363726970742f76)](https://packagist.org/packages/org_heigl/ghostscript)[![Total Downloads](https://camo.githubusercontent.com/2c74df30c28e2cf3de49d5184fabc50a9c6a66564fcd5c6505d4689cb5a5a857/687474703a2f2f706f7365722e707567782e6f72672f6f72675f686569676c2f67686f73747363726970742f646f776e6c6f616473)](https://packagist.org/packages/org_heigl/ghostscript)[![Latest Unstable Version](https://camo.githubusercontent.com/ae847032cfd1627c7bee3885d7edf94e4342f2116227e8e6d41393d45a395a85/687474703a2f2f706f7365722e707567782e6f72672f6f72675f686569676c2f67686f73747363726970742f762f756e737461626c65)](https://packagist.org/packages/org_heigl/ghostscript)[![License](https://camo.githubusercontent.com/d6c6756d3f966327422498cf21ee6bed83a3d6a5dcd0745de765e8ebaf34267f/687474703a2f2f706f7365722e707567782e6f72672f6f72675f686569676c2f67686f73747363726970742f6c6963656e7365)](https://packagist.org/packages/org_heigl/ghostscript)[![PHP Version Require](https://camo.githubusercontent.com/e38c0718dad43f5a343dbb14bdbe7b81afe923988d50755f62fa8b4ce2a5def7/687474703a2f2f706f7365722e707567782e6f72672f6f72675f686569676c2f67686f73747363726970742f726571756972652f706870)](https://packagist.org/packages/org_heigl/ghostscript)

A PHP-wrapper to the Ghostscript-CLI

The main reason to create this library was to create images from PDF- or Postscript-files. As those Files can be either in RGB- or in CMYK-Colorspace the library tries to handle colors so that the original file and the image are close in color-impression. This is especially important as f.e. PNG is RGB-only while JPEG can be either in RGB or CMYK.

Multipaged PDF-Files will create multiple images! To not overwrite your image-files the filename will be passed to sprintf to create a filename containing the number of the page. The one and only parameter will be the number of the page.

Why another Ghostscript-Wrapper?
--------------------------------

[](#why-another-ghostscript-wrapper)

There are currently 2 other wrappers around that both didn't meet the requirements I had:

- [gravitymedia/ghostscript](https://packagist.org/packages/gravitymedia/ghostscript)
- [alchemy/ghostscript](https://packagist.org/packages/alchemy/ghostscript)

While the gravitymedia library concentrates more on creating PDFs from input-media the alchemy library is not easily extendable and doesn't handle the parameters to finetune Ghostscript the way I needed them.

So this library tries to handle most of the important switches to ghostscript and also allows you to extend the library by implementing your own driver using the `DriverInterface`. More information on that will be shown in the [Documentation](https://heiglandreas.github.io/Org_Heigl_Ghostscript)

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

[](#installation)

This package is best installed using [composer](https://getcomposer.org).

```
composer require org_heigl/ghostscript

```

Documentation
-------------

[](#documentation)

You can find the documentation for the library at [https://heiglandreas.github.io/Org\_Heigl\_Ghostscript](https://heiglandreas.github.io/Org_Heigl_Ghostscript)

Usage
-----

[](#usage)

```
