# Path: streamcorpus_pipeline/stages.py
# class Configured(object):
#     '''Any object containing a configuration.
# 
#     The configuration is passed to the constructor.
# 
#     .. attribute:: config
# 
#         The configuration dictionary for this object.
# 
#     '''
#     def __init__(self, config, *args, **kwargs):
#         super(Configured, self).__init__(*args, **kwargs)
#         self.config = config


from cStringIO import StringIO
from pdfminer.pdfinterp import PDFResourceManager, PDFPageInterpreter
from pdfminer.converter import TextConverter
from pdfminer.layout import LAParams
from pdfminer.pdfpage import PDFPage
from pdfminer.pdftypes import PDFException
from streamcorpus_pipeline.stages import Configured
import logging
from __future__ import absolute_import



logger = logging.getLogger(__name__)

## http://stackoverflow.com/questions/5725278/python-help-using-pdfminer-as-a-library
def convert_pdf_to_text(data):
    rsrcmgr = PDFResourceManager()

# Path: streamcorpus_pipeline/stages.py
# class Configured(object):
#     '''Any object containing a configuration.
# 
#     The configuration is passed to the constructor.
# 
#     .. attribute:: config
# 
#         The configuration dictionary for this object.
# 
#     '''
#     def __init__(self, config, *args, **kwargs):
#         super(Configured, self).__init__(*args, **kwargs)
#         self.config = config


# Path: streamcorpus_pipeline/_pdf_to_text.py
from cStringIO import StringIO
from pdfminer.pdfinterp import PDFResourceManager, PDFPageInterpreter
from pdfminer.converter import TextConverter
from pdfminer.layout import LAParams
from pdfminer.pdfpage import PDFPage
from pdfminer.pdftypes import PDFException
from streamcorpus_pipeline.stages import Configured
import logging

from __future__ import absolute_import



logger = logging.getLogger(__name__)

## http://stackoverflow.com/questions/5725278/python-help-using-pdfminer-as-a-library
def convert_pdf_to_text(data):
    rsrcmgr = PDFResourceManager()

    retstr = StringIO()