2017 © Pedro Peláez
 

library ghostscript

Ghostscript wrapper for converting PDFs to images

image

robgridley/ghostscript

Ghostscript wrapper for converting PDFs to images

  • Tuesday, July 31, 2018
  • by robgridley
  • Repository
  • 1 Watchers
  • 1 Stars
  • 41 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 17 % Grown

The README.md

Ghostscript PHP

Yet another Ghostscript PHP wrapper for converting PDFs (or PS files) to images. This library accepts strings, streams or real files as input and returns the output from stdout as a string., (*1)

Installation

composer require robgridley/ghostscript:dev-master

Usage Example

use RobGridley\Ghostscript\Devices;
use RobGridley\Ghostscript\RealFile;
use RobGridley\Ghostscript\Ghostscript;
use RobGridley\Ghostscript\VirtualFile;

$device = new Devices\Png24;
$device->setDownScaleFactor(2);

$gs = new Ghostscript($device);
$gs->setPageBox('trim');
$gs->setResolution(144);

$file = new RealFile('/path/to/file.pdf');
// or $file = new VirtualFile($someString);

$image = $gs->convert($file);

The Versions

31/07 2018

dev-master

9999999-dev

Ghostscript wrapper for converting PDFs to images

  Sources   Download

MIT

The Requires

 

The Development Requires

by Rob Gridley

pdf ghostscript jpeg png gs