Reads all the XRefs in the PDF file and returns them.
(self)
| 739 | |
| 740 | # read xref tables and trailers |
| 741 | def read_xref(self): |
| 742 | """Reads all the XRefs in the PDF file and returns them.""" |
| 743 | xrefs = [] |
| 744 | try: |
| 745 | pos = self.find_xref() |
| 746 | self.read_xref_from(pos, xrefs) |
| 747 | except PDFNoValidXRef: |
| 748 | # fallback |
| 749 | if 1 <= self.debug: |
| 750 | print >>sys.stderr, 'no xref, fallback' |
| 751 | self.fallback = True |
| 752 | xref = PDFXRef() |
| 753 | xref.load_fallback(self) |
| 754 | xrefs.append(xref) |
| 755 | return xrefs |
| 756 | |
| 757 | |
| 758 | ## PDFStreamParser |
no test coverage detected