If you want the cleanest looking files, use a program like PDF Split, if you want the smallest files, use the print to PDF method above. Figure 8: Splitting a PDF in Split PDF. Sometimes PDF optimization is not enough to shoehorn your PDF within strict file size limits. Splitting larger PDFs into multiple files is the answer. GhostScript itself does not have the ability to split a PDF into separate files for each page. You can either write a bash script that runs the above command for each page in the file or you can use Pdftk to 'burst' a PDF into separate pages.Latest version
Interface to the Ghostscript C-API, both high- and low-level, based on ctypes
|Author:||Hartmut Goebel <email@example.com>|
|License:||GNU Public License v3 (GPLv3)|
Ghostscript is a well known interpreter for the PostScriptlanguage and for PDF. This package implements a interface to theGhostscript 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. Richard buckner the hill rar. Please reportwhether it works in your environment, too. Thanks.
Here is an example for how to use the high-level interface ofpython-ghostscript. This implements a very basic ps2pdf-tool:
Here an example for passing a string document to Ghostscript:
More examples can be found in the examples subdirectory of thedistribution archive.
Requirements and Installation
|Please note:||This package is meant for developers. Even if there aresome usable examples included, installations instructions are meantfor developers.|
- Python 2.7 or higher (tested with Python 2.7, 3.4, 3.6 and 3.6)
- setuptools for installation (see below)
- Ghostscript Version 8.x or higher (tested with 9.x)
Since this package is meant for developers, we assume you haveexperience in installing Python packages.
python-ghostscript is listed on PyPI (Python Package Index), soyou can install it using pip install ghostscript as usual. Pleaserefer to the manuals of pip for further information.
Alternatively you my download and unpack the source package ofpython-ghostscript from http://pypi.python.org/pypi/ghostscript andrun:
Release historyRelease notifications
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
|Filename, size||File type||Python version||Upload date||Hashes|
|Filename, size ghostscript-0.6-py2.py3-none-any.whl (15.2 kB)||File type Wheel||Python version py2.py3||Upload date||Hashes|
|Filename, size ghostscript-0.6.tar.gz (34.3 kB)||File type Source||Python version None||Upload date||Hashes|
Hashes for ghostscript-0.6-py2.py3-none-any.whl
Hashes for ghostscript-0.6.tar.gz