'Reads XRefs from the given location.'

def read_xref_from(self, start, xrefs):

    self.seek(start)
    self.reset()
    try:
        (pos, token) = self.nexttoken()
    except PSEOF:
        raise PDFNoValidXRef('Unexpected    EOF')
    if (2 <= self.debug):
        print >>sys.stderr, ('read_xref_from:    start=%d,    token=%r' % (start, token))
    if isinstance(token, int):
        self.seek(pos)
        self.reset()
        xref = PDFXRefStream()
        xref.load(self, debug=self.debug)
    else:
        if (token is self.KEYWORD_XREF):
            self.nextline()
        xref = PDFXRef()
        xref.load(self, debug=self.debug)
    xrefs.append(xref)
    trailer = xref.get_trailer()
    if (1 <= self.debug):
        print >>sys.stderr, ('trailer:    %r' % trailer)
    if ('XRefStm' in trailer):
        pos = int_value(trailer['XRefStm'])
        self.read_xref_from(pos, xrefs)
    if ('Prev' in trailer):
        pos = int_value(trailer['Prev'])
        self.read_xref_from(pos, xrefs)
    return
