{ "info": { "author": "Hartmut Goebel", "author_email": "h.goebel@crazy-compilers.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "License :: OSI Approved :: GNU General Public License (GPL)", "Natural Language :: English", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "==========================\n`python-ghostscript`\n==========================\n\n---------------------------------------------------------------------\nPython-Interface to the Ghostscript C-API\n---------------------------------------------------------------------\n\n:Author: Hartmut Goebel \n:Version: 0.6\n:License: GNU Public License v3 (GPLv3)\n:Homepage: https://gitlab.com/pdftools/python-ghostscript\n\n`Ghostscript`__ is a well known interpreter for the PostScript\nlanguage and for PDF. This package implements a interface to the\n`Ghostscript C-API`__ using `ctypes`__. Both a low-level and a pythonic,\nhigh-level interface are provided.\n\n__ http://www.ghostscript.com/\n__ http://pages.cs.wisc.edu/~ghost/doc/cvs/API.htm\n__ http://docs.python.org/library/ctypes.html\n\n\nThis package is currently tested only under GNU/Linux. Please report\nwhether it works in your environment, too. Thanks.\n\n\nExample\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nHere is an example for how to use the high-level interface of\n`python-ghostscript`. This implements a very basic ps2pdf-tool::\n\n import sys\n import locale\n import ghostscript\n\n args = [\n \"ps2pdf\",\t# actual value doesn't matter\n \"-dNOPAUSE\", \"-dBATCH\", \"-dSAFER\",\n \"-sDEVICE=pdfwrite\",\n \"-sOutputFile=\" + sys.argv[1],\n \"-c\", \".setpdfwrite\",\n \"-f\", sys.argv[2]\n ]\n\n # arguments have to be bytes, encode them\n encoding = locale.getpreferredencoding()\n args = [a.encode(encoding) for a in args]\n\n ghostscript.Ghostscript(*args)\n\nHere an example for passing a string document to Ghostscript::\n\n doc = b\"\"\"%!\n /Helvetica findfont 20 scalefont setfont \n 50 50 moveto\n (Hello World) show\n showpage\n quit\n \"\"\"\n\n import ghostscript\n\n args = b\"\"\"test.py\n -dNOPAUSE -dBATCH -dSAFER -sDEVICE=pdfwrite -sOutputFile=/tmp/out.pdf\n -c .setpdfwrite\"\"\".split()\n\n with ghostscript.Ghostscript(*args) as gs:\n gs.run_string(doc)\n\n\nMore examples can be found in the `examples` subdirectory of the\ndistribution archive.\n\n\nRequirements and Installation\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\n:Please note: This package is meant for developers. Even if there are\n some usable examples included, installations instructions are meant\n for developers.\n\n`python-ghostscript` requires\n\n* `Python`__ 2.7 or higher (tested with Python 2.7, 3.4, 3.6 and 3.6)\n* `setuptools`__ for installation (see below)\n* `Ghostscript`__ Version 8.x or higher (tested with 9.x)\n\n__ http://www.python.org/download/\n__ http://pypi.python.org/pypi/setuptools\n__ http://www.ghostscript.com/\n\n\nInstalling python-ghostscript\n---------------------------------\n\nSince this package is meant for developers, we assume you have\nexperience in installing Python packages.\n\n`python-ghostscript` is listed on `PyPI (Python Package Index)`__, so\nyou can install it using `pip install ghostscript` as usual. Please\nrefer to the manuals of `pip` for further information.\n\n__ http://pypi.python.org/pypi\n\nAlternatively you my download and unpack the source package of\n`python-ghostscript` from http://pypi.python.org/pypi/ghostscript and\nrun::\n\n python ./setup.py install\n\n\n\n.. Emacs config:\n Local Variables:\n mode: rst\n ispell-local-dictionary: \"american\"\n End:\n\n\n", "description_content_type": null, "docs_url": null, "download_url": "http://pypi.python.org/pypi/ghostscript", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://gitlab.com/pdftools/python-ghostscript", "keywords": "Ghostscript,PDF,Postscript", "license": "GPL 3.0", "maintainer": "", "maintainer_email": "", "name": "ghostscript", "package_url": "https://pypi.org/project/ghostscript/", "platform": "", "project_url": "https://pypi.org/project/ghostscript/", "project_urls": { "Download": "http://pypi.python.org/pypi/ghostscript", "Homepage": "https://gitlab.com/pdftools/python-ghostscript" }, "release_url": "https://pypi.org/project/ghostscript/0.6/", "requires_dist": [ "setuptools" ], "requires_python": "", "summary": "Interface to the Ghostscript C-API, both high- and low-level, based on ctypes", "version": "0.6" }, "last_serial": 3495364, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "b279397a927a5bc4096a372313e4354c", "sha256": "ba71065e723f28ea241eb78b4e9139801720785b350962c307261b8550c5a9b5" }, "downloads": -1, "filename": "ghostscript-0.1.tar.bz2", "has_sig": false, "md5_digest": "b279397a927a5bc4096a372313e4354c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 19383, "upload_time": "2010-08-06T15:07:34", "url": "https://files.pythonhosted.org/packages/85/7a/853ee8e18d50cd479d9f1df2f2bd1d900fd75367c311ed43e500ed4a0365/ghostscript-0.1.tar.bz2" }, { "comment_text": "", "digests": { "md5": "d04196ddddafa9166722ee48ae62478e", "sha256": "60038b5c8fd24dfc1c9e1fda559c554ba9a81a36a1eb6a67f58bcd97e9d73f65" }, "downloads": -1, "filename": "ghostscript-0.1.zip", "has_sig": false, "md5_digest": "d04196ddddafa9166722ee48ae62478e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 31966, "upload_time": "2010-08-06T15:07:37", "url": "https://files.pythonhosted.org/packages/79/62/5299a45e004f53eb98a53eb1e78a7cae3de14413e263333fdd594d05ae50/ghostscript-0.1.zip" } ], "0.2": [ { "comment_text": "", "digests": { "md5": "5e8850e79ac845f766f72176d0d71a48", "sha256": "58dd1ad6fec28fd719ab73a6f018b9703e9747c3961726b1e89d766bddd6c0d0" }, "downloads": -1, "filename": "ghostscript-0.2.tar.bz2", "has_sig": false, "md5_digest": "5e8850e79ac845f766f72176d0d71a48", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 19609, "upload_time": "2010-08-06T18:51:53", "url": "https://files.pythonhosted.org/packages/c4/cc/5221e2ff9014923eb5b6d52d936f66ed68c1e7b5d4f8c8d34db0d10248ca/ghostscript-0.2.tar.bz2" }, { "comment_text": "", "digests": { "md5": "65a5848f729f1b2a38c28c53b1467012", "sha256": "172893d99ed7ab7f7617bd2a62d6c70ba7c37be12024d2ec375f2ce959ef4562" }, "downloads": -1, "filename": "ghostscript-0.2.zip", "has_sig": false, "md5_digest": "65a5848f729f1b2a38c28c53b1467012", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 32811, "upload_time": "2010-08-06T18:51:56", "url": "https://files.pythonhosted.org/packages/90/93/e5e26db21f4dff229402df90f602e43f66e119648f20cfd97a9c5f2712f3/ghostscript-0.2.zip" } ], "0.3": [ { "comment_text": "", "digests": { "md5": "f918f0185b4f253a8359d944ed2cab87", "sha256": "87c1bc7bfc984fed1732434f8a150897696cad5abdaaabb57b3b7f77b4b30f1f" }, "downloads": -1, "filename": "ghostscript-0.3.tar.bz2", "has_sig": false, "md5_digest": "f918f0185b4f253a8359d944ed2cab87", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 25551, "upload_time": "2010-08-12T14:57:03", "url": "https://files.pythonhosted.org/packages/6c/d8/00ec3842a682959468463e57d2208820bdd7000c0ef1e194ad8caf6f8fc7/ghostscript-0.3.tar.bz2" }, { "comment_text": "", "digests": { "md5": "a73faa9b2e9673bf843e73b7a7c6f6d3", "sha256": "14168815c9811bade03ce61b3f4e8cc82aacebf15218d740374b6eefff5226d0" }, "downloads": -1, "filename": "ghostscript-0.3.zip", "has_sig": false, "md5_digest": "a73faa9b2e9673bf843e73b7a7c6f6d3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 38973, "upload_time": "2010-08-12T14:57:06", "url": "https://files.pythonhosted.org/packages/ab/85/5404f4d3154d30f4667855a72aa27f9f6f0489bd9b37edde7c8c42c01689/ghostscript-0.3.zip" } ], "0.4": [ { "comment_text": "", "digests": { "md5": "d6b284c4bee96ec377ab7d96b6588589", "sha256": "47224e21083ee82f57d737895ac2dafa20db1a059dd5ab53e0562f7fb9ea572c" }, "downloads": -1, "filename": "ghostscript-0.4.tar.bz2", "has_sig": false, "md5_digest": "d6b284c4bee96ec377ab7d96b6588589", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 27176, "upload_time": "2011-01-29T15:20:03", "url": "https://files.pythonhosted.org/packages/6e/95/93b7b64f742b7ec980c5a4841353ebd823aaec1928e3f07e9e760fe75d12/ghostscript-0.4.tar.bz2" }, { "comment_text": "", "digests": { "md5": "a2b2183e263d1c271ccd03aa6a95e08b", "sha256": "43ab6ca6c19aefac3b805d55341965c24369d559e8b430b986308130a5a11db4" }, "downloads": -1, "filename": "ghostscript-0.4.zip", "has_sig": false, "md5_digest": "a2b2183e263d1c271ccd03aa6a95e08b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 41677, "upload_time": "2011-01-29T15:20:04", "url": "https://files.pythonhosted.org/packages/bb/5c/82786ac6a36fbbb17977f641f14cbb958cdbc19ba06f9f46df1d1fa409c2/ghostscript-0.4.zip" } ], "0.4.1": [ { "comment_text": "", "digests": { "md5": "4409b5e46bf53db33e539938e65c46dd", "sha256": "72cca4be76efea43feec4146fdbc219418f2162c746472f452236bc2136139a0" }, "downloads": -1, "filename": "ghostscript-0.4.1.tar.bz2", "has_sig": false, "md5_digest": "4409b5e46bf53db33e539938e65c46dd", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 28121, "upload_time": "2011-02-09T10:58:16", "url": "https://files.pythonhosted.org/packages/e6/3b/1fbaaafda0a83b721e6e83f45e27c0581cb678f497568747abed9ed16cd9/ghostscript-0.4.1.tar.bz2" }, { "comment_text": "", "digests": { "md5": "42bd242bd134afff770720baff2b2864", "sha256": "bf5cc6ac7fdd29bc8caf0094ed8f91e1ca8c17f668c02667acf15076f02fa25f" }, "downloads": -1, "filename": "ghostscript-0.4.1.zip", "has_sig": false, "md5_digest": "42bd242bd134afff770720baff2b2864", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 46228, "upload_time": "2011-02-09T10:58:17", "url": "https://files.pythonhosted.org/packages/f6/56/3e368fcfee387aaeff3b5d1898b30702ba250d32166ef66936edf06283fd/ghostscript-0.4.1.zip" } ], "0.5.dev0": [ { "comment_text": "", "digests": { "md5": "95889574abbbf358506ced7ca4647c8c", "sha256": "2ac0003e96d20871a01e3ff5e444b7dfb9651e471b0b26a5990a9ad97cbb5afc" }, "downloads": -1, "filename": "ghostscript-0.5.dev0.linux-x86_64.tar.gz", "has_sig": false, "md5_digest": "95889574abbbf358506ced7ca4647c8c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 18075, "upload_time": "2018-01-16T22:13:25", "url": "https://files.pythonhosted.org/packages/94/00/b7a251046919bc7086415ca952ea3fb2df85a996340905453472cb20c990/ghostscript-0.5.dev0.linux-x86_64.tar.gz" }, { "comment_text": "", "digests": { "md5": "e34cf1cce1c522a55495137ca5fe48a9", "sha256": "ed9d62de412299117dbeaab8b0e143c8af1ca66e2eb30a7f7754ef89e48bd854" }, "downloads": -1, "filename": "ghostscript-0.5.dev0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "e34cf1cce1c522a55495137ca5fe48a9", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 15315, "upload_time": "2018-01-16T22:13:22", "url": "https://files.pythonhosted.org/packages/e8/be/6046ddf8ff957c639d942893ff3afb68fe7d0db21546b62f48055d44e6e2/ghostscript-0.5.dev0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "6f5d6dc59a4bd8362b4fb942182c1b30", "sha256": "616767fdf22fae7dc2de377332b4542725ab76295a83d33954ef8a6bbb7dffb3" }, "downloads": -1, "filename": "ghostscript-0.5.dev0-py3-none-any.whl", "has_sig": false, "md5_digest": "6f5d6dc59a4bd8362b4fb942182c1b30", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 15310, "upload_time": "2018-01-16T22:13:19", "url": "https://files.pythonhosted.org/packages/97/4a/0e1585213909bc5691cce7cc6c8d7ba2fb560f66b8d66bc1cb0f8a21e756/ghostscript-0.5.dev0-py3-none-any.whl" } ], "0.6": [ { "comment_text": "", "digests": { "md5": "579c0878726acae200da60305b4fef22", "sha256": "db90da79326ae62e4a3cc58a7c39c4be6503ad71c5e73047fb68599ae5e40cba" }, "downloads": -1, "filename": "ghostscript-0.6-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "579c0878726acae200da60305b4fef22", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 15237, "upload_time": "2018-01-16T22:13:18", "url": "https://files.pythonhosted.org/packages/d0/bd/c96072da3a98a498285382ec6ee4b18379c021e4bb6561308e25bc4c04d0/ghostscript-0.6-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "5be9c4fedce48d1946a181979b5b4258", "sha256": "ad0a71048dd96644c46d09f7c8c7d479e2b4d290ca3125cc49540e463a2877ac" }, "downloads": -1, "filename": "ghostscript-0.6.tar.gz", "has_sig": false, "md5_digest": "5be9c4fedce48d1946a181979b5b4258", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 34269, "upload_time": "2018-01-16T22:13:23", "url": "https://files.pythonhosted.org/packages/94/9e/7336c40a3286ee4b58016a5e032102715e2517c343ac3b7d672c2c92210c/ghostscript-0.6.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "579c0878726acae200da60305b4fef22", "sha256": "db90da79326ae62e4a3cc58a7c39c4be6503ad71c5e73047fb68599ae5e40cba" }, "downloads": -1, "filename": "ghostscript-0.6-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "579c0878726acae200da60305b4fef22", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 15237, "upload_time": "2018-01-16T22:13:18", "url": "https://files.pythonhosted.org/packages/d0/bd/c96072da3a98a498285382ec6ee4b18379c021e4bb6561308e25bc4c04d0/ghostscript-0.6-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "5be9c4fedce48d1946a181979b5b4258", "sha256": "ad0a71048dd96644c46d09f7c8c7d479e2b4d290ca3125cc49540e463a2877ac" }, "downloads": -1, "filename": "ghostscript-0.6.tar.gz", "has_sig": false, "md5_digest": "5be9c4fedce48d1946a181979b5b4258", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 34269, "upload_time": "2018-01-16T22:13:23", "url": "https://files.pythonhosted.org/packages/94/9e/7336c40a3286ee4b58016a5e032102715e2517c343ac3b7d672c2c92210c/ghostscript-0.6.tar.gz" } ] }