'Reads all the XRefs in the PDF file and returns them.'

def read_xref(self):

    xrefs = []
    try:
        pos = self.find_xref()
        self.read_xref_from(pos, xrefs)
    except PDFNoValidXRef:
        if (1 <= self.debug):
            print >>sys.stderr, 'no    xref,    fallback'
        self.fallback = True
        xref = PDFXRef()
        xref.load_fallback(self)
        xrefs.append(xref)
    return xrefs
