(self, obj, config)
Run PDF service
Run PDF service
Run PDF service
def run(self, obj, config):
        """
        Run PDF service
        """
        data = obj.filedata.read()

        self._info('Sample PDF Version: {}'.format(self._get_pdf_version(data[:1024])))
        try:
            self._info('PDF Parser Version: {}'.format(pdfparser.__version__))
            self._info('PDFid Version: {}'.format(pdfid.__version__))
        except AttributeError:
            pass

        self.run_pdfid(data)
        self._notify()
        self.run_pdfparser(data)
def run ( self , obj , config ) : data = obj . filedata . read ( ) self . _info ( 'Sample PDF Version: {}' . format ( self . _get_pdf_version ( data [ : 1024 ] ) ) ) try : self . _info ( 'PDF Parser Version: {}' . format ( pdfparser . __version__ ) ) self . _info ( 'PDFid Version: {}' . format ( pdfid . __version__ ) ) except AttributeError : pass self . run_pdfid ( data ) self . _notify ( ) self . run_pdfparser ( data )