extracttext() - flag for not throwing an ifilter error

Features wanted...
Post Reply
highend
Posts: 14644
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

extracttext() - flag for not throwing an ifilter error

Post 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.
Attachments
pdfs.zip
(221.91 KiB) Downloaded 85 times
3.png
3.png (1.74 KiB) Viewed 943 times
One of my scripts helped you out? Please donate via Paypal

Horst
Posts: 1348
Joined: 24 Jan 2021 12:27
Location: Germany

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

Post 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.
Windows 11 Home, Version 25H2 (OS Build 26200.7462)
Portable x64 XYplorer (Actual version, including betas)
Display settings 1920 x 1080 Scale 100%
Everything 1.5.0.1404a (x64), Everything Toolbar 2.1.1, Listary Pro 6.3.6.99

highend
Posts: 14644
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

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

Post 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
One of my scripts helped you out? Please donate via Paypal

admin
Site Admin
Posts: 65287
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

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

Post by admin »

Okay. :)

highend
Posts: 14644
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

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

Post by highend »

:tup:
One of my scripts helped you out? Please donate via Paypal

Post Reply