def is_trailer_present(pdf, obj_end_index):
    """Checks if trailer is present in PDF file."""

    pdf.seek(0)
    pdf = pdf.read()

    if b'trailer' in pdf[obj_end_index::]:
        return True

    return False