def center_id_from_filename(filename):
    """Given the name of a rollgen PDF output file, return the center_id embedded in that name"""
    # Fortunately all filenames are of the format NNNNN_XXXXXX.pdf where NNNNN is the center id
    # and everything else comes after the first underscore.
    return int(filename[:filename.index('_')])