Sicos1977 / IFilterTextReader

A reader that gets text from different file formats through the IFilter interface
Other
55 stars 38 forks source link

Can't get the PDF filter to load the IPersistStream in FileLoader.cs #25

Closed dhigginx1 closed 6 years ago

dhigginx1 commented 6 years ago

First off I'd like to thank you for all your efforts on this set of tools. I am, however, having an issue getting the function "FileContainsText" from Reader.cs to work in my web application. I have built and run your sample Console app and it works properly.
When I integrated IFilterTextReader into my web app, I found that it worked properly on all other files I am scanning except PDF files. I am on a 64 bit machine and I have loaded and verified the 64 bit driver from Adobe. When I try to scan a PDF file, the call "iPersistStream.Load(comStream);" always throws an IFOldFilterFormat Exception with the message "Error HRESULT E_FAIL has been returned from a call to a COM component." Another piece of the puzzle may be that in my App, the call to LoadFilterFromDll seems to take an inordinate amount of time to load the first time it's run, taking from 15 seconds to 45seconds to complete. Mind you, it does not throw an error or fail to return an IFilter object, it just takes much longer in my app to run than in your Demo application. I am using Job() and running _job.AddProcess(Process.GetCurrentProcess().Handle); when my web page first loads.

Again, your Demo program and and all other file types work except PFD, do you have any suggestions of what to check next?

Thanks in advance, -Dennis

Sicos1977 commented 6 years ago

I assume that your web app is running in IIS? If so then under what user is your web app running? You can find the user in the application pool that your web app is using.

dhigginx1 commented 6 years ago

Actually, I'm trying to get a simplified version of the web application with only the search capabilities working on my local machine (Win 7 64 bit) under IIS Express using Clr4ClassicAppPool

dhigginx1 commented 6 years ago

I transferred the exact same program to IIS on my local machine and everything worked just fine. It appears that there's something that is different about IIS Express that is causing this issue. Thanks for your time. It's not much but please accept my PayPal donation as thanks for your time and what you've created here. -Dennis

Sicos1977 commented 6 years ago

Thanks