# CHAPTER 0. Preliminaries

def loadDLL(f):
    """Load the libpycpdf DLL from a given file, and set up pycpdflib."""

class Pdf:
    """The type of PDF documents."""

class CPDFError(Exception):
    """Any function may raise an exception CPDFError, carrying a string
    describing what went wrong"""

def lastError():
    """Return the last error. Not usually used directly, since pycpdflib
    functions raise exceptions."""

def lastErrorString():
    """Return the last error string. Not usually used directly, since pycpdflib
    functions raise exceptions."""

def checkerror():
    """Raise an exception if the last function call resulted in an error. Not
    used directly, since pycpdflib functions will raise the exception
    directly."""

def version():
    """Returns the version number of the pycpdflib library."""

def setFast():
    """ Some operations have a fast mode. The default is 'slow' mode, which
    works even on old-fashioned files. For more details, see section 1.13 of
    the CPDF manual. These functions set the mode globally. """

def setSlow():
    """ Some operations have a fast mode. The default is 'slow' mode, which
    works even on old-fashioned files. For more details, see section 1.13 of
    the CPDF manual. These functions set the mode globally. """

def clearError():
    """ clearError clears the current error state. """

def onExit():
    """ onExit is a debug function which prints some information about
    resource usage. This can be used to detect if PDFs or ranges are being
    deallocated properly."""
