Dear Bonelli, I got ur email from zope mailing list. I am trying to index pdf files using ExtDocument. But as i add a pdf file from the management screen as an ExtDocument,it gets added successfully but when i catalog the ExtDocument There is nothing in the principle search source. I have installed the pdftotext successfully . But i dont know as to why still I am not getting anything in the Principle SearchSource. Please Help me !!! Best Regards, Vineet Ahuja _________________________________________________________________ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp
Hi Vineet, I would try the following debug path: 1. check whether pdftotext works by running it from the shell 2. check in ExtDocument.py that you pass the right filename argument to PrincipiaSearchSource I bet that the problem is in the filename passing, so here is what works for me: def PrincipiaSearchSource(self): """Convert data to raw text (don't bother formatting)""" filename=self._get_filename(self.filename) content_type=self.content_type if content_type == 'application/pdf': return popen('pdftotext -raw %s -' % filename).read() elif content_type =='text/plain': return popen('type %s' % filename).read() else: return 'abracadabra' 3. after confirmig 1. and 2. above, check in the Catalog (locate the extDocument entry under Catalog tab) what you got in PrincipiaSearchSource. I hope this helps. --peppo -----Original Message----- From: zope-admin@zope.org [mailto:zope-admin@zope.org]On Behalf Of Vineet Ahuja Sent: giovedì 13 settembre 2001 11.47 To: zope@zope.org Subject: [Zope] ExtDocument problem Dear Bonelli, I got ur email from zope mailing list. I am trying to index pdf files using ExtDocument. But as i add a pdf file from the management screen as an ExtDocument,it gets added successfully but when i catalog the ExtDocument There is nothing in the principle search source. I have installed the pdftotext successfully . But i dont know as to why still I am not getting anything in the Principle SearchSource. Please Help me !!! Best Regards, Vineet Ahuja _________________________________________________________________ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp _______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
participants (2)
-
Giuseppe Bonelli -
Vineet Ahuja