def markLocation(stream):
 RADIUS = 5000
 stream.seek((- RADIUS), 1)
 outputDoc = open('PyPDF2_pdfLocation.txt', 'w')
 outputDoc.write(stream.read(RADIUS))
 outputDoc.write('HERE')
 outputDoc.write(stream.read(RADIUS))
 outputDoc.close()
 stream.seek((- RADIUS), 1)

def markLocation ( stream ) : RADIUS = 5000 stream . seek ( ( - RADIUS ) , 1 ) outputDoc = open ( 'PyPDF2_pdfLocation.txt' , 'w' ) outputDoc . write ( stream . read ( RADIUS ) ) outputDoc . write ( 'HERE' ) outputDoc . write ( stream . read ( RADIUS ) ) outputDoc . close ( ) stream . seek ( ( - RADIUS ) , 1 )
creates text file showing current location in context .