def find_xref(self, parser):
<EOL>prev = None<EOL>for line in parser.revreadlines():<EOL><INDENT>line = line.strip()<EOL>if self.debug:<EOL><INDENT>logging.debug('<STR_LIT>' % line)<EOL><DEDENT>if line == b'<STR_LIT>':<EOL><INDENT>break<EOL><DEDENT>if line:<EOL><INDENT>prev = line<EOL><DEDENT><DEDENT>else:<EOL><INDENT>raise PDFNoValidXRef('<STR_LIT>')<EOL><DEDENT>if self.debug:<EOL><INDENT>logging.info('<STR_LIT>' % prev)<EOL><DEDENT>return long(prev)<EOL>
Internal function used to locate the first XRef.