[Zope] ExtDocument problem

Giuseppe Bonelli g.bonelli@pn.itnet.it
Thu, 13 Sep 2001 15:47:33 +0200


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=3Dself._get_filename(self.filename)
		content_type=3Dself.content_type
		if content_type =3D=3D 'application/pdf':
			return popen('pdftotext -raw %s -' % filename).read()
		elif content_type =3D=3D'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=EC 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=20
added successfully but when i catalog the ExtDocument There is nothing =
in=20
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=20
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 -=20
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )