Download the PHP package daandesmedt/phpghostscript without Composer

On this page you can find all versions of the php package daandesmedt/phpghostscript. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package phpghostscript

PHPGhostscript

A PHP wrapper for Ghostscript ; an interpreter for PostScript™ and Portable Document Format (PDF) files.

Use PHPGhostscript for rendering PDF / PostScript™ files to various image types (jpeg / png) or export to PDF with page range (single page / multipage).

Setting multiple input files merge them.

Easy to use and OOP interfaced.

Installation

Install the package through composer:

Make sure, that you include the composer autoloader somewhere in your codebase.

Usage

Use PHPGhostscript for rendering PDF / PostScript™ files to various image types (jpeg / png) or export to PDF with page range (single page / multipage).

Working examples

Working examples can be found in the examples folder.

Supported devices

PHPGhostscript output devices implement DeviceInterface.

PHPGhostscript supports common output devices:

Specify a output device

Set output decive through DeviceTypes constant.

OR set with instanceof DeviceInterface

Device specific parameters

Device output type Function
JPEG / JPEG GREY setQuality(int $quality)
PNG ALPHA setBackgroundColor(string $color)
setDownScaleFactor(int $factor)
PNG MONO D setMinFeatureSize(int $size)
PNG 16M setDownScaleFactor(int $factor)

Example :

PDF (single page) / PostScript™ to Image

Single output file per page

Export multi-page PDF files to seperate image files using the ` Specifying a single output file works fine for printing and rasterizing figures, but sometimes you want images of each page of a multi-page document. You can tellPHPGhostscriptto put each page of the input file in a series of similarly named files. To do this place a template%din thesetOutputFilesetter (%d` will be replaced by the matching page number).

Specify page range

or set start and end explicitly

Clear specified page range

Subsample antialiasing

These options control the use of subsample antialiasing. Their use is highly recommended for producing high quality rasterizations of the input files. Use Ghostscript::ANTIALIASING_HIGH for optimum output, user Ghostscript::ANTIALIASING_LOW or Ghostscript::ANTIALIASING_NONE for faster rendering. Antialiasing can be set separately for text and graphics content, but only for image type output devices.

or set text and graphics antialiasing explicitly

Output resolution

This option sets the resolution of the output file in dots per inch. The default value if you don't specify this options is 72 dpi. Support for specifying horizontal and vertical resolution.

Setting CIE Color

Set UseCIEColor in the page device dictionary, remapping device-dependent color values through a Postscript defined CIE color space. Document DeviceGray, DeviceRGB and DeviceCMYK source colors will be substituted respectively by Postscript CIEA, CIEABC and CIEDEFG color spaces. Only for image type output devices.

Setting page content region

Sets the page size to one of the following :

Handling exceptions

PHPGhostscript will throw following exceptions :


All versions of phpghostscript with dependencies

PHP Build Version
Package Version
Requires php Version >= 7.0.0
mikehaertl/php-shellcommand Version ^1.2
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package daandesmedt/phpghostscript contains the following files

Loading the files please wait ....