This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Latest Version Dependencies status unknown Test status unknown Test coverage unknown
Project Description

Ghostscript, is a well known interpreter for the PostScript language and for PDF. This package implements a interface to the Ghostscript C-API using ctypes. Both a low-level and a pythonic, high-level interface are provided.

This package is currently tested only under GNU/Linux. Please report whether it works in your environment, too. Thanks.


Here is an example for how to use the high-level interface of python-ghostscript. This implements a very basic ps2pdf-tool:

import sys
import ghostscript

args = [
    "ps2pdf", # actual value doesn't matter
    "-dNOPAUSE", "-dBATCH", "-dSAFER",
    "-sOutputFile=" + sys.argv[1],
    "-c", ".setpdfwrite",
    "-f",  sys.argv[2]


Here an example for passing a string document to Ghostscript:

doc = """%!
/Helvetica findfont 20 scalefont setfont
50 50 moveto
(Hello World) show

import ghostscript

args = """
     -dNOPAUSE -dBATCH -dSAFER -sDEVICE=pdfwrite -sOutputFile=/tmp/out.pdf
     -c .setpdfwrite""".split()

GS = ghostscript.Ghostscript(*args)

More examples can be found in the examples subdirectory of the distribution archive.

Requirements and Installation

Please note:This package is meant for developers. Even if there are some usable examples included, installations instructions are meant for developers.

python-ghostscript requires

  • Python 2.3 or higher (tested with Python 2.6)
  • ctypes when using Python 2.3 or 2.4 (ctypes is already included in Python 2.5 and higher)
  • setuptools or distribute for installation (see below).
  • Ghostscript Version 8.x

Installing python-ghostscript

Since this package is meant for developers, we assume you have experience in installing Python packages.

python-ghostscript is listed on PyPI (Python Package Index), so you can install it using easy_install or pip as usual. Please refer to the manuals of easy_install resp. pip for further information.

Alternatively you my download and unpack the source package of python-ghostscript from and run:

python ./ install
Release History

Release History


This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

TODO: Brief introduction on what you do with files - including link to relevant help section.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
python3_ghostscript-0.5.0-py3-none-any.whl (14.8 kB) Copy SHA256 Checksum SHA256 3.5 Wheel Jun 22, 2016
python3-ghostscript-0.5.0.tar.bz2 (21.4 kB) Copy SHA256 Checksum SHA256 Source Jun 22, 2016 (30.2 kB) Copy SHA256 Checksum SHA256 Source Jun 22, 2016

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS HPE HPE Development Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting