PDFiumSharp
PDFiumSharp copied to clipboard
BadImageFormatException
I'm running on x64 and have pulled down the source, everything compiles successfully but at runtime running the Test.Console project I get the exception.
It looks like its trying to load the pdfium_x86.dll. Have you run into this?
if (RuntimeInformation.ProcessArchitecture == Architecture.X64)
lock(_lock) { return PlatformInvoke.FPDF_LoadDocument_x64(file_path, password); }
else if (RuntimeInformation.ProcessArchitecture == Architecture.X86)
lock(_lock) { return PlatformInvoke.FPDF_LoadDocument_x86(file_path, password); }
else
throw new PlatformNotSupportedException();
Based on my testing last night, it seems like the problem is associated to .NETStandard 1.4. I updated the library to target .NETStandard2.0 and it works just fine.
Thanks for your efforts, Ill update to 2.0 soon