'Determine if the file is in pdf format.'

def sniff(self, filename):

    headers = get_headers(filename, None, 1)
    try:
        if headers[0][0].startswith('%PDF'):
            return True
        else:
            return False
    except IndexError:
        return False
