# -- coding: utf-8""" A simple PDF accessibility checking WAM
Creation: Anand B Pillai April 27 2007
Modification History
Anand April 27 07 Added more exception handling. Fixed a
problem in pyPdf which was not reading
certain encrypted PDF docs.
"""frompyPdfimportPdfFileReaderfrompdfAWAMHandlerimportPdfAWAMHandlerfrompdfStructureMixinimportPdfStructureMixinimportsysclassDecryptionFailedException(Exception):pass__author__="Anand B Pillai"__maintainer__="Anand B Pillai"__version__="0.1"definit(self,stream,password=''):""" Function which overrides '__init__' of PdfFileReader class """# Our init accepts the password and does# decryption inline in the read method.self.flattenedPages=Noneself.resolvedObjects={}# In pdf.py the read happens before the following# 2 initializations. But we need to