ghostscript
index
c:\python projects\ghostscript\ghostscript.py

GhostScript interface API through ctypes
# The GhostScript Windows DLL is interfaced through gsdll32.dll
# Linux is libgs.so and OS X *should* be Ghostscript.framework

 
Modules
       
os
sys

 
Classes
       
_ctypes.Structure(_ctypes._CData)
GSAPIVERSION
exceptions.Exception(exceptions.BaseException)
GhostScriptError
GhostScript

 
class GSAPIVERSION(_ctypes.Structure)
    
Method resolution order:
GSAPIVERSION
_ctypes.Structure
_ctypes._CData
__builtin__.object

Data descriptors defined here:
__dict__
dictionary for instance variables (if defined)
__weakref__
list of weak references to the object (if defined)
copyright
Structure/Union member
product
Structure/Union member
revision
Structure/Union member
revisiondate
Structure/Union member

Methods inherited from _ctypes.Structure:
__init__(...)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature

Data and other attributes inherited from _ctypes.Structure:
__new__ = <built-in method __new__ of _ctypes.StructType object at 0x1D1B18A8>
T.__new__(S, ...) -> a new object with type S, a subtype of T

Methods inherited from _ctypes._CData:
__ctypes_from_outparam__(...)
__hash__(...)
x.__hash__() <==> hash(x)
__reduce__(...)
__setstate__(...)

 
class GhostScript
    # Main Class for interfacing with Ghostscript
 
  Methods defined here:
SetFontCompression(self, compressFonts=True)
SetPDFLevel(self, newLevel='1.4')
Shutdown(self)
# Performs a clean shutdown of Ghostscript
__init__(self, stdio_callback=None)
pdf2ps(self, input_file, output_file)
ps2epsi(self, input_file, output_file='')
ps2pdf(self, input_file, output_file)

 
class GhostScriptError(exceptions.Exception)
    
Method resolution order:
GhostScriptError
exceptions.Exception
exceptions.BaseException
__builtin__.object

Methods defined here:
ReturnCode(self)
__init__(self, value, return_code=0)
__str__(self)

Data descriptors defined here:
__weakref__
list of weak references to the object (if defined)

Data and other attributes inherited from exceptions.Exception:
__new__ = <built-in method __new__ of type object at 0x1E1D6018>
T.__new__(S, ...) -> a new object with type S, a subtype of T

Methods inherited from exceptions.BaseException:
__delattr__(...)
x.__delattr__('name') <==> del x.name
__getattribute__(...)
x.__getattribute__('name') <==> x.name
__getitem__(...)
x.__getitem__(y) <==> x[y]
__getslice__(...)
x.__getslice__(i, j) <==> x[i:j]
 
Use of negative indices is not supported.
__reduce__(...)
__repr__(...)
x.__repr__() <==> repr(x)
__setattr__(...)
x.__setattr__('name', value) <==> x.name = value
__setstate__(...)
__unicode__(...)

Data descriptors inherited from exceptions.BaseException:
__dict__
args
message

 
Functions
       
FormatError(...)
FormatError([integer]) -> string
 
Convert a win32 error code into a string. If the error code is not
given, the return value of a call to GetLastError() is used.
GhostscriptVersion()
POINTER(...)
addressof(...)
addressof(C instance) -> integer
Return the address of the C instance internal buffer
alignment(...)
alignment(C type) -> integer
alignment(C instance) -> integer
Return the alignment requirements of a C instance
byref(...)
byref(C instance[, offset=0]) -> byref-object
Return a pointer lookalike to a C instance, only usable
as function argument
get_errno(...)
get_last_error(...)
gs_output(handle, buffer, length)
# Default callback handler for stdin/stdout/stderr
# You can override this by creating your own function and wrap it in GS_STDIOFUNC
pointer(...)
resize(...)
Resize the memory buffer of a ctypes instance
set_conversion_mode(...)
set_conversion_mode(encoding, errors) -> (previous-encoding, previous-errors)
 
Set the encoding and error handling ctypes uses when converting
between unicode and strings.  Returns the previous values.
set_errno(...)
set_last_error(...)
sizeof(...)
sizeof(C type) -> integer
sizeof(C instance) -> integer
Return the size in bytes of a C instance

 
Data
        DEFAULT_MODE = 0
GSVersion = <ghostscript.GSAPIVERSION object at 0x00C11080>
GetLastError = <_FuncPtr object at 0x00BE0468>
PDF_COMPAT_LEVELS = ['1.2', '1.3', '1.4']
RTLD_GLOBAL = 0
RTLD_LOCAL = 0
cdll = <ctypes.LibraryLoader object at 0x00C1C7D0>
e_ExecStackUnderflow = -104
e_Fatal = -100
e_Info = -110
e_InterpreterExit = -102
e_NeedInput = -106
e_Quit = -101
e_RemapColor = -103
e_VMerror = -25
e_VMreclaim = -105
e_configurationerror = -26
e_dictfull = -2
e_dictstackoverflow = -3
e_dictstackunderflow = -4
e_execstackoverflow = -5
e_interrupt = -6
e_invalidaccess = -7
e_invalidcontext = -29
e_invalidexit = -8
e_invalidfileaccess = -9
e_invalidfont = -10
e_invalidid = -30
e_invalidrestore = -11
e_ioerror = -12
e_limitcheck = -13
e_nocurrentpoint = -14
e_rangecheck = -15
e_stackoverflow = -16
e_stackunderflow = -17
e_syntaxerror = -18
e_timeout = -19
e_typecheck = -20
e_undefined = -21
e_undefinedfilename = -22
e_undefinedresource = -27
e_undefinedresult = -23
e_unknownerror = -1
e_unmatchedmark = -24
e_unregistered = -28
gs = <WinDLL 'gsdll32.dll', handle 10000000 at c0ebd0>
gs_version = <_FuncPtr object at 0x00BE0738>
log_func = <WinFunctionType object at 0x00BE0C60>
memmove = <CFunctionType object at 0x00BE04E0>
memset = <CFunctionType object at 0x00BE0558>
oledll = <ctypes.LibraryLoader object at 0x00C1C870>
pydll = <ctypes.LibraryLoader object at 0x00C1C7F0>
pythonapi = <PyDLL 'python dll', handle 1e000000 at c1c810>
windll = <ctypes.LibraryLoader object at 0x00C1C830>