':param http_resp: A http response object that contains a document of
type HTML / PDF / WML / etc.
:return: True if the document parameter is a string that contains a PDF
document.'

@staticmethod
def can_parse(http_resp):

    if (http_resp.content_type in ('application/x-pdf', 'application/pdf')):
        document = http_resp.body
        if (not document):
            return False
        if (document.startswith('%PDF-') and ('%%EOF' in document[(-12):])):
            try:
                text = pdf_to_text(document)
            except Exception:
                return False
            else:
                return (text != u'')
    return False
