I'm trying to use Adobe PDF Ifilter 11 on Win 10 to extract text from PDF files via a general Ifilter text extraction program in c#. The program contains the following code
private static NativeMethods.IFilter LoadFilterFromDll(string dllName, string filterPersistClass)
{
// Get a classFactory for our classID
var classFactory = ComHelpers.GetClassFactory(dllName, filterPersistClass);
if (classFactory == null)
return null;
// And create an IFilter instance using that class factory
var filterGuid = new Guid("89BCB740-6119-101A-BCB7-00DD010655AF");
Object ppunk;
classFactory.CreateInstance(null, ref filterGuid, out ppunk);
return (ppunk as NativeMethods.IFilter);
}
Usiing the Adobe PDF IFlter 11 (and IFilter 9). The CreateInstance call is very slow to execute and when the text is extracted is called the message
Error HRESULT E_FAIL has been returned from a call to a COM component.
appears.
Text extraction works OK with the PDFLib TET Ifilter.
Adobe Reader DC is installed.
Does anyone know a workaround that would allow an Adobe PDF IFilter to be used?