'Add an internal link from a rectangular area to the specified page.
:param int pagenum: index of the page on which to place the link.
:param int pagedest: index of the page to which the link should go.
:param rect: :class:`RectangleObject<PyPDF2.generic.RectangleObject>` or array of four
integers specifying the clickable rectangular area
``[xLL, yLL, xUR, yUR]``, or string in the form ``"[ xLL yLL xUR yUR ]"``.
:param border: if provided, an array describing border-drawing
properties. See the PDF spec for details. No border will be
drawn if this argument is omitted.
:param str fit: Page fit or \'zoom\' option (see below). Additional arguments may need
to be supplied. Passing ``None`` will be read as a null value for that coordinate.
Valid zoom arguments (see Table 8.2 of the PDF 1.7 reference for details):
/Fit       No additional arguments
/XYZ       [left] [top] [zoomFactor]
/FitH      [top]
/FitV      [left]
/FitR      [left] [bottom] [right] [top]
/FitB      No additional arguments
/FitBH     [top]
/FitBV     [left]'

def addLink(self, pagenum, pagedest, rect, border=None, fit='/Fit', *args):

    pageLink = self.getObject(self._pages)['/Kids'][pagenum]
    pageDest = self.getObject(self._pages)['/Kids'][pagedest]
    pageRef = self.getObject(pageLink)
    if (border is not None):
        borderArr = [NameObject(n) for n in border[:3]]
        if (len(border) == 4):
            dashPattern = ArrayObject([NameObject(n) for n in border[3]])
            borderArr.append(dashPattern)
    else:
        borderArr = ([NumberObject(0)] * 3)
    if isString(rect):
        rect = NameObject(rect)
    elif isinstance(rect, RectangleObject):
        pass
    else:
        rect = RectangleObject(rect)
    zoomArgs = []
    for a in args:
        if (a is not None):
            zoomArgs.append(NumberObject(a))
        else:
            zoomArgs.append(NullObject())
    dest = Destination(NameObject('/LinkName'), pageDest, NameObject(fit), *zoomArgs)
    destArray = dest.getDestArray()
    lnk = DictionaryObject()
    lnk.update({NameObject('/Type'): NameObject('/Annot'), NameObject('/Subtype'): NameObject('/Link'), NameObject('/P'): pageLink, NameObject('/Rect'): rect, NameObject('/Border'): ArrayObject(borderArr), NameObject('/Dest'): destArray})
    lnkRef = self._addObject(lnk)
    if ('/Annots' in pageRef):
        pageRef['/Annots'].append(lnkRef)
    else:
        pageRef[NameObject('/Annots')] = ArrayObject([lnkRef])
