Page 1 of 1

extracttext() - flag for not throwing an ifilter error

Posted: 04 Mar 2021 13:05
by highend
extracttext([file], [flag=0/1])
flag = 0 (Default): Show errors in the scripting window
flag = 1: Just return an empty string, don't throw an error
text extracttext(<curitem>);
on both of the attached .pdf files leads to a totally fine output of the 02 - Text output.pdf one
but throws the error on 01 - IFilter error.pdf

The 01 file just contains an image and no text at all.

Re: extracttext() - flag for not throwing an ifilter error

Posted: 04 Mar 2021 13:16
by Horst
I guess the error depends in some way on the installed ifilter.
On my system both of your files throw an ifilter error 80004005.
I have the TETPDFiFilter installed.

Re: extracttext() - flag for not throwing an ifilter error

Posted: 04 Mar 2021 13:20
by highend
I guess the error depends in some way on the installed ifilter.
Ofc it does. But that's not the point. You can't use it in scripts if you get such an unavoidable script error...

I use the Sumatra PDF iFilter and it works fine for pdfs that contain (at least some) text

Re: extracttext() - flag for not throwing an ifilter error

Posted: 04 Mar 2021 15:23
by admin
Okay. :)

Re: extracttext() - flag for not throwing an ifilter error

Posted: 04 Mar 2021 16:35
by highend
:tup: