Not sure I understand the problem... I'm gonna forward it to the list to see if someone else does. _get_filename should return the filename and path as one string... Tim Vineet Ahuja wrote:
good news its working now!°!!!!!!hurrae m sorry my converters path was not set:(:( but one last problem!!! i m not still able to get the path of the file from:-
filename=self._get_filename(self.filename) if c[0]: return popen('pdftotext -raw %s -' % filename).read() else: return '' filename is not able to provide path of the .pdf file. now what to do.i guess its the last step. regards vineet ahuja
From: Tim McLaughlin <tim@iterationzero.com> Reply-To: tim@iterationzero.com To: Vineet Ahuja <ahujavineet@hotmail.com> Subject: Re: ExtDocument problem Date: Fri, 14 Sep 2001 09:57:23 -0400
OK, I think you hit the problem (and I wouldn't think of it cuz I use Linux). Anyway, try hardcoding the path for pdftotext into the converters in ExtDocument.py... ie.
... 'application/pdf': ('c:\\xpdf\\pdftotext.exe -raw %s -', etc...
Tim
Vineet Ahuja wrote:
hi peppo,tim
Even after upgrade the same thing is happening.
something interesting:- i have put a small script in extensions direcrtory:-
---Example.py--- from os import popen from os.path import join import string def hello(name="world"): return popen('pdftotext -raw %s -' %join('test.pdf') ).read() ---Example.py----end
And i am calling the hello with an external method. When i test that extrnal method:- now that is also not returning me anything i mean the progress bar keeps
on
moving but nothing happens. But when u run that Example.py from dos with print popen('pdftotext -raw %s -' %join('test.pdf') ).read() then it gives me the text out put.
One thing i would like to ´tell u is that i have put the .exe for the pdftotext converter directly into the directories ExtFile and ExtDocument and even the Extensions. Now what next u guys suggest me to do. Best regards, Vineet Ahuja
From: Tim McLaughlin <tim@iterationzero.com> Reply-To: tim@iterationzero.com To: Vineet Ahuja <ahujavineet@hotmail.com> Subject: Re: ExtDocument problem Date: Fri, 14 Sep 2001 09:06:05 -0400
Upgrade to Extfile 1.1.2 and ExtDoc 0.3. I tested it on this config and it worked fine :) Lemme know.
Incidentally, are you in AI at MIT?
Tim
Vineet Ahuja wrote:
ok.. Yeah I am getting the text output on the dos promt when i run pdftotext test.pdf
I am running the whole thing on NT. these are the versions:- ExtFile/ExtImage-1-1-0-beta3 ExtDocument-0.2.0 zope 2.4.0 I have attached the test.pdf . Best Regards, Vineet Ahuja
From: Tim McLaughlin <tim@iterationzero.com> Reply-To: tim@iterationzero.com To: Vineet Ahuja <ahujavineet@hotmail.com>, zope@zope.org Subject: Re: ExtDocument problem Date: Fri, 14 Sep 2001 08:53:01 -0400
That means that it is not returning anything or an empty string
('').
Try doing a pdftotext on the file in the shell, and see what it returns. If that works, then let me know what versions of ExtFile and ExtDoc you have, and email me the pdf.
Tim
Vineet Ahuja wrote: > > Dear Tim, > I called the link as u said:- > http://localhost:8080/demo/impdemo/vin/PrincipiaSearchSource > where vin is the instance of ExtDocument. > as i call the link the progress bar seems to be keep on pregressing and > nothing seems to happen.It seems to stuck. > Now what could be the reason for this.? > Regards, > Vineet Ahuja > > >From: Tim McLaughlin <tim@iterationzero.com> > >Reply-To: tim@iterationzero.com > >To: Vineet Ahuja <ahujavineet@hotmail.com>, zope@zope.org > >Subject: Re: ExtDocument problem > >Date: Thu, 13 Sep 2001 11:14:50 -0400 > > > >The catalog needs to be named "Catalog" not "CatalogAware" and the url > >is ... > >http://HOST/INSTANCE/PrincipiaSearchSource > > > >where HOST=the zope server > >and INSTANCE=the instance of the ExtDocument including the path (ie. > >"/papers/research.pdf") > > > >Tim > > > >Vineet Ahuja wrote: > > > > > > dear tim, > > > i ahve renamed my catalog to CatalogAware but still it doesnt help. > > > And I tried to test the method directly by:- > > > >http://localhost:8080/extDocInstance/PrincipiaSearchSource > > > but it says that the URl does not exist. > > > > > > And your second point I can not understand.The text index in the catalog > >is > > > called as PrincipiaSearchSource. > > > I m using all this over WindowsNt. > > > Kindly help as its been now 2 days that I am struggeling with the > >problem. > > > Best Regards, > > > Vineet Ahuja > > > > > > >From: Tim McLaughlin <tim@iterationzero.com> > > > >Reply-To: tim@iterationzero.com > > > >To: Vineet Ahuja <ahujavineet@hotmail.com>, zope@zope.org > > > >Subject: Re: ExtDocument problem > > > >Date: Thu, 13 Sep 2001 09:03:25 -0400 > > > > > > > >Vineet, > > > >Is the catalog named 'Catalog' and acquirable to the document? (this > > > >uses CatalogAware, and that's how it works) And secondly, is the Index > > > >still called 'PrincipiaSearchSource', not Principle, because that is > >the > > > >attribute name. You can test the functionality of the method by > >calling > > > >it on the ExtDocument like this... > > > > > > > >http://SERVER_NAME/extDocInstance/PrincipiaSearchSource > > > > > > > >and that should give you the "raw" data that will be indexed. If it's > > > >none of the above, let me know. > > > > > > > >-- > > > >Tim McLaughlin > > > >iterationZERO - www.iterationzero.com > > > >703.481.2233 > > > > > > > >Vineet Ahuja wrote: > > > > > > > > > > Dear tim, > > > > > > > > > > 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 > > > > > >
> > > Get your FREE download of MSN Explorer at > >http://explorer.msn.com/intl.asp > > > >-- > >Tim McLaughlin > >iterationZERO - www.iterationzero.com > >703.481.2233 > >
> Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp
-- Tim McLaughlin iterationZERO - www.iterationzero.com 703.481.2233
_________________________________________________________________ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp
------------------------------------------------------------------------
Name: test.pdf test.pdf Type: Portable Document Format
(application/pdf)
Encoding: base64 Download Status: Not downloaded with message
-- Tim McLaughlin iterationZERO - www.iterationzero.com 703.481.2233
_________________________________________________________________ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp
-- Tim McLaughlin iterationZERO - www.iterationzero.com 703.481.2233
_________________________________________________________________ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp
-- Tim McLaughlin iterationZERO - www.iterationzero.com 703.481.2233