def int_to_page_alpha(pageno, base):
    """return uppercase alphabetic page numbers for PAGENO starting at BASE (a or A).
Adobe defines them as A to Z, then AA to ZZ, and so on.
Yes, that is somewhat wacky."""
    div, mod = divmod(pageno - 1, 26)
    c = chr(mod + ord(base))
    return c * (div + 1)
