def getLinks(page):
CheckParent(page)<EOL>ln = page.firstLink<EOL>links = []<EOL>while ln:<EOL><INDENT>nl = getLinkDict(ln)<EOL>if nl["<STR_LIT>"] == LINK_GOTO:<EOL><INDENT>if type(nl["<STR_LIT:to>"]) is Point and nl["<STR_LIT>"] >= <NUM_LIT:0>:<EOL><INDENT>doc = page.parent<EOL>target_page = doc[nl["<STR_LIT>"]]<EOL>ctm = target_page._getTransformation()<EOL>point = nl["<STR_LIT:to>"] * ctm<EOL>nl["<STR_LIT:to>"] = point<EOL><DEDENT><DEDENT>links.append(nl)<EOL>ln = ln.next<EOL><DEDENT>if len(links) > <NUM_LIT:0>:<EOL><INDENT>linkxrefs = page._getLinkXrefs()<EOL>if len(linkxrefs) == len(links):<EOL><INDENT>for i in range(len(linkxrefs)):<EOL><INDENT>links[i]["<STR_LIT>"] = linkxrefs[i]<EOL><DEDENT><DEDENT><DEDENT>return links<EOL>
Create a list of all links contained in a PDF page.

    Notes:
        see PyMuPDF ducmentation for details.