def build_output_file_pattern(out_fn):
    """Builds the string pattern "{OUTFN}-{PAGE_RANGE}.pdf". This is necessary
       if one wants to extract multiple page ranges and does not join the single
       results.

       Arguments:
            out_fn    --    Output filename

       Returns:
            String value which represents the filename pattern.
    """
    if len(out_fn.split(".")) >= 2:
        tokens = out_fn.split(".")
        outfile = "".join(tokens[0:len(tokens) - 1])
        return outfile + "-%s.pdf"
    else:
        return out_fn + "-%s.pdf"