Skip to main content
Author:

Hartmut Goebel <h.goebel@crazy-compiler.com>

Version:
0.3
Homepage:

http://bitbucket.org/htgoebel/python-ghostscript

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 and Windows XP. Please report whether it works in your environment, too. Thanks.

Example

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",
    "-sDEVICE=pdfwrite",
    "-sOutputFile=" + sys.argv[1],
    "-c", ".setpdfwrite",
    "-f",  sys.argv[2]
    ]

ghostscript.Ghostscript(*args)

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 may download and unpack the source package of python-ghostscript from http://pypi.python.org/pypi/ghostscript and run:

python ./setup.py install

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

ghostscript-0.3.zip (39.0 kB view details)

Uploaded Source

ghostscript-0.3.tar.bz2 (25.6 kB view details)

Uploaded Source

File details

Details for the file ghostscript-0.3.zip.

File metadata

  • Download URL: ghostscript-0.3.zip
  • Upload date:
  • Size: 39.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for ghostscript-0.3.zip
Algorithm Hash digest
SHA256 14168815c9811bade03ce61b3f4e8cc82aacebf15218d740374b6eefff5226d0
MD5 a73faa9b2e9673bf843e73b7a7c6f6d3
BLAKE2b-256 ab855404f4d3154d30f4667855a72aa27f9f6f0489bd9b37edde7c8c42c01689

See more details on using hashes here.

File details

Details for the file ghostscript-0.3.tar.bz2.

File metadata

  • Download URL: ghostscript-0.3.tar.bz2
  • Upload date:
  • Size: 25.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for ghostscript-0.3.tar.bz2
Algorithm Hash digest
SHA256 87c1bc7bfc984fed1732434f8a150897696cad5abdaaabb57b3b7f77b4b30f1f
MD5 f918f0185b4f253a8359d944ed2cab87
BLAKE2b-256 6cd800ec3842a682959468463e57d2208820bdd7000c0ef1e194ad8caf6f8fc7

See more details on using hashes here.

Release history Release notifications | RSS feed

0.8.1

2 files

0.8

2 files

0.7

2 files

0.6

2 files

0.4.1

2 files

0.4

2 files

This release

0.3 This release

2 files

0.2

2 files

0.1

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page