'Get words from the pdf document.
:param response: In most common cases, an html. Could be almost
anything, if we are lucky, it\'s a PDF file.
:return: A map of strings:repetitions.'

def get_words(self, response):

    res = None
    if (response.content_type in ('application/x-pdf', 'application/pdf')):
        try:
            words = self._get_pdf_content(response.get_body())
        except:
            return None
        else:
            res = {}
            for w in words:
                if (w in res):
                    res[w] += 1
                else:
                    res[w] = 1
    return res
