def get_pageinfo(input_file, context):
    "Get zero-based page info implied by filename, e.g. 000002.pdf -> 1"
    pageno = page_number(input_file) - 1
    pageinfo = context.get_pdfinfo()[pageno]
    return pageinfo